Promotions
The Promotions API applies and clears promotional codes on a cart. Validation, discount calculation, and stacking rules are owned by the merchant’s platform — Firmly forwards the codes and returns the resulting cart.
Available Endpoints
Add Promo Codes
Apply one or more promotional codes to the cart.
Clear Promo Codes
Remove all promotional codes from the cart.
Result on the Cart
Applied codes appear in the cart’s top-level coupons array (array of strings). Discount amounts surface in:
cart_discount— total discount applied to the cartcart_discount_breakdown— per-promotion breakdown (when the merchant exposes it)line_items[].discountandline_items[].line_discount— per-line amounts (when the merchant exposes them)
Totals (sub_total, tax_total, total) are recalculated server-side after each add/clear.