The discount model
POST /discounts returns a discount with an id like disc_.... The shape is centered on two enums: the type of discount and its duration.
| Field | Type | Notes |
|---|---|---|
code | string | The code buyers enter, e.g. LAUNCH20. |
discount_type | enum | percentage or fixed. |
percent_off | number | The percentage off (for percentage discounts), e.g. 20. |
amount_off | int (cents) | The amount off (for fixed discounts), e.g. 1000 = $10.00. |
currency | string | Lowercase ISO, required for fixed discounts. |
duration | enum | forever, once, or repeating — how long the discount applies to a subscription. |
duration_in_months | int | Required when duration is repeating. |
redeem_by | date-time | Expiry — the code stops working after this. |
max_redemptions | int | Total number of times the code can be used. |
price_variants | array | Price variant ids (price_...) the discount is scoped to. Omit to apply account-wide. |
duration matters most for subscriptions: once discounts only the first charge, repeating discounts for duration_in_months, and forever discounts every charge. For one-time purchases the discount simply applies to that purchase.Worked example: a 20% launch code
A percentage code, capped at 500 redemptions, expiring in two weeks, applying to everything:Worked example: $10 off, scoped to one variant
A fixed-amount code that only works on a specific price variant:price_variants lists a single variant, SAVE10 is rejected at checkout for any other item.
Applying a discount
A discount reaches a buyer in one of two ways:At checkout — discount_code
Pass the code’s string when creating a checkout:
On a checkout link — discount
Attach a discount by id to a reusable checkout link so it’s applied automatically, and decide whether buyers may also enter their own code:
Next steps
Checkouts
Apply discounts via
discount_code and on reusable checkout links.Products & pricing
Create the price variants you scope discounts to.
Subscriptions & billing
How
duration shapes discounts on recurring subscriptions.Commerce overview
See where discounts sit in the full commerce model.

