Validate coupon codes
Validates coupon codes against specific products and customer criteria to verify discount eligibility and calculate savings before applying them to a transaction.
Body Parameters
Coupon codes to validate.
Currency code for discount calculation.
Customer country for geo-restricted coupon validation.
Products to validate coupons against (1–20).
Product UUID.
Number of units.
Custom price in smallest currency unit (required when no id/variant/pack).
Custom product name (required when no id/variant/pack).
Variant UUID.
Pack UUID.
Responses
Returns validation results for each submitted coupon code.
Validation result for each submitted coupon.
Whether the coupon code is valid.
The coupon code that was validated.
Fixed discount amount in smallest currency unit. Null for invalid coupons.
Percentage discount. Null for invalid coupons.
Fixed shipping discount in smallest currency unit.
Percentage shipping discount.
Currency the discount applies in. Null for invalid coupons.
Product scope the discount applies to.
all_productsselected_productsselected_categoriesProduct UUIDs the coupon is restricted to. Null unless applies_to is selected_products.
Category groups the coupon is restricted to. Null unless applies_to is selected_categories.
Customer the discount is restricted to. Null for non-customer-specific discounts.
Unix timestamp of coupon expiry. Null if no expiry.
Additional requirements for the coupon (e.g. specific countries or payment methods).
Reason the coupon is invalid. Null for valid coupons.
invalid-couponexpiry-dateinvalid-orderinvalid-countryinvalid-currencyValidation error.
| Code | Description |
|---|---|
| 400 | Invalid or missing required parameters. |
Missing or invalid API key