These fields are optional. Omitting them preserves the existing checkout behavior. Continue using
X-API-Version: 2026-03-01.
Let buyers enter a promotion code
Setcheckout.allow_promotion_codes to true when your server creates the Bridge session. Stripe displays the code-entry field on its payment page; the Numeral address collector does not collect the code.
Tax eligibility for buyer-entered codes
Buyer-entered codes are supported when the applicable tax rules remain valid as the discounted price changes. Percentage-based taxes and eligible zero-rate or exempt carts can qualify. Rules with price thresholds, tax caps, flat fees, or other unsupported calculations cannot use this option. Numeral checks eligibility before returning the Stripe Checkout URL. If the cart is ineligible, use a pre-applied discount so Numeral can calculate tax from the discounted amounts.Enabling promotion codes permits the buyer’s final total to differ from the initial quote. In manual-confirmation flows,
accepted_total still refers to that initial quote.Apply a discount before calculating tax
Replaceallow_promotion_codes in the request above with one of these checkout.discounts values:
promotion_code takes Stripe’s promo_... object ID, not the buyer-facing code such as SUMMER20. Create and manage coupons and promotion codes in the connected Stripe account. See Stripe’s discount guide.
Numeral applies percentage or fixed-amount discounts to eligible products before calculating tax, then verifies the amounts against Stripe before exposing the checkout URL.
Restrictions
discountsaccepts at most one entry, containing exactly one ofcouponorpromotion_code.- Do not combine a pre-applied discount with
allow_promotion_codes: true. - Prices, coupons, and promotion codes must belong to the configuration’s connected Stripe account and the same test or live mode.
- If the Stripe connection uses a restricted key, it needs permission to read coupons and promotion codes.
- Stripe enforces redemption limits, customer restrictions, minimum spend, and expiration. Pass
checkout.customerwhen a code is restricted to an existing Stripe Customer. - Combine repeated instances of the same Stripe Price into one line item with the total quantity when using discounts.
Read the initial and final amounts
For sessions that opt into discounts, the server response includesamount_discount on the quote and its lines, plus a settlement field. Amounts use the currency’s smallest unit, such as cents for USD.
The original subtotal before discounts is
subtotal + amount_discount. For example, a $24.00 cart with a 20% discount has subtotal: 1920 and amount_discount: 480 before tax.
Numeral retains quote after checkout. Retrieve the Bridge session from your server and read settlement for the verified final amounts, especially when the buyer entered a code in Stripe. Numeral verifies the final cart and tax before committing the discounted transaction.
Sessions that omit discount options retain their existing response shape; the additional discount and settlement fields are not required for those sessions.
Handle errors and retries
Codes in a session’s
last_error.code use lowercase, as shown above. Immediate API errors use an uppercase type, such as PROVIDER_OPTION_CONFLICT.
A temporary eligibility-check failure can return a session in phase: "processing" with a retryable last_error. Repeating the create request resumes that session with its original cart and configuration.
Test discounted and zero-dollar orders
Test a valid code, an expired or ineligible code, a pre-applied discount, and a 100% discount using your test-mode Stripe connection. For a zero-dollar payment checkout:- Stripe does not collect a payment method. A 100% discount cannot be used to collect a card for future charges.
- Do not require a PaymentIntent to exist.
- Wait for the Bridge session to reach a completed, verified state. Fulfillment must also handle
status: "complete",payment_status: "no_payment_required", andtax_status: "not_applicable", rather than requiring every completed checkout to reportpaid.