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
| Param | Type | Required | Description |
|---|---|---|---|
code | string | ✅ | The promo code string entered by customer |
subtotal | number | ❌ | Cart subtotal — required for minimum order checks |
cart_items | CartItem[] | ❌ | Required for product-specific promo codes |