Skip to main content

shop.checkout.validatePromo(params)

Validates a promo code and returns the calculated discount amount. Call this when the customer applies a promo code — before placing the order.

Parameters

Response

Example — Promo code input UI

Passing promo to createOrder

Always pass both promo_code_id and discount_amount to createOrder. Passing only one will result in incorrect order totals.