---
schema_version: "1"
id: 145c3f8dbf516c6ff4677f15cef87ac78f731e3ad23c94640561fb879b8526d6
title: Coupon Validation API
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/global_promotions_management_run_pricing_coupon_validation_api.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.global_promotions_management_run_pricing_coupon_validation_api.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 23d7b2005da8ce4cb4e84ef74ebb07ddf0aad9b4d8f32a3e34a8776cd5d70678
description: Use the Coupon Validation API to verify manually entered coupon codes before applying discounts. Validating coupons upfront—rather than waiting until checkout—gives customers immediate feedback on whether their code works. The API checks if the coupon exists, is active, hasn't reached redemption limits, and if the cart is eligible for the promotion.
products:
  - Marketing
release: "264"
---
# Coupon Validation API

Use the Coupon Validation API to verify manually entered coupon codes before applying discounts. Validating coupons upfront—rather than waiting until checkout—gives customers immediate feedback on whether their code works. The API checks if the coupon exists, is active, hasn't reached redemption limits, and if the cart is eligible for the promotion.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>,&nbsp;<strong>Unlimited</strong>, and&nbsp;<strong>Developer</strong>&nbsp;Editions with Real-Time Offer Management</td></tr></tbody></table>

## How Coupon Validation Works

Integrate the Coupon Validation API with systems such as shopping sites and point-of-sale (POS) systems. To validate coupons, provide up to 1,000 manually entered coupon codes in the couponsToValidate request property.

If the cart already contains coupon codes in its coupon fields, the API also discovers and validates those codes. You don't need to copy those codes into couponsToValidate. For coupons that pass the coupon-level checks, the API evaluates promotion eligibility based on where each code is attached.

- For a coupon attached to the cart header, the API evaluates the entire cart.
- For a coupon attached to a cart line, the API evaluates only that line. The line must participate in a promotion associated with the coupon.

Provide the cart and its line items in the request, using the same cart structure as the [Eligible Promotions API](https://help.salesforce.com/s/articleView?id=mktg.global_promotions_management_run_pricing_eligible_api.htm&language=en_US) and the [Promotion Evaluation and Execution API](https://help.salesforce.com/s/articleView?id=mktg.global_promotions_management_run_pricing_eval_api.htm&language=en_US).

## Coupon Validation Results

For each coupon code, the response provides these details.

- An aggregate status across the applicable scopes. The status is `Valid` when the coupon passes validation for at least one applicable scope. Otherwise, the status is `Invalid`.
- For a valid coupon, the valid scope, the associated promotion ID, and, for a `Line` scope, the applicable cart line item IDs.
- For an invalid coupon, the reason that validation failed.