Create a Coupon
Creates a coupon — the discount definition that promotional codes are built on.
Only name is required. Set couponType to PERCENTAGE and supply percentOff (1–100), or set it to FLAT and supply both amountOff and currency. When couponType is omitted the coupon is stored as PERCENTAGE, so send percentOff alongside it.
duration controls how long the discount keeps applying to a subscription: once, forever (the default here), or repeating — which additionally requires durationInMonths.
Fires the coupon.created webhook.
Creating Coupons
Create a new coupon definition that can be used to generate promotional codes for your affiliates.Coupon Types
- PERCENTAGE: Discount based on a percentage (e.g., 20% off)
- FLAT: Fixed amount discount (e.g., $10 off)
Duration Options
- once: Applies to a single payment
- forever: Applies to all future payments
- repeating: Applies for a specific number of months
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The coupon to create
Name of the coupon
"Launch 20%"
Whether the discount is a percentage or a fixed amount
PERCENTAGE, FLAT Percentage taken off, 1–100. Required when couponType is PERCENTAGE.
Fixed amount taken off. Required when couponType is FLAT.
Currency for amountOff. Required when couponType is FLAT.
"USD"
How long the discount keeps applying to a subscription
once, forever, repeating Number of months the discount repeats for. Required when duration is repeating.
Total redemptions allowed across every promotional code on this coupon. Omit for unlimited.
Restrict the coupon to productIds
Products the coupon applies to
Whether the coupon can be redeemed straight away
Last date the coupon can be redeemed
The coupon's ID in the connected billing provider. Must be unique.
The billing provider this coupon is synced with
NONE, STRIPE, CHARGEBEE, PADDLE, SHOPIFY, WOOCOMMERCE, ZYLVIE, POLAR Response
The created coupon.
A discount definition. Promotional codes point at a coupon for their value.
The coupon ID
Name of the coupon
The coupon's ID in the connected billing provider, for example a Stripe coupon ID
Whether the discount is a percentage or a fixed amount
PERCENTAGE, FLAT Percentage taken off, 1–100. Used when couponType is PERCENTAGE.
Fixed amount taken off. Used when couponType is FLAT.
Currency for amountOff, for example USD
How long the discount keeps applying to a subscription
once, forever, repeating Number of months the discount repeats for. Only set when duration is repeating.
Total redemptions allowed across every promotional code on this coupon. null means unlimited.
How many times this coupon has been redeemed so far
Whether the coupon discounts customers or is used to pay affiliates as a non-cash reward
CUSTOMER, PAYOUT Whether the coupon only applies to productIds
Products the coupon is restricted to
Collections the coupon is restricted to
Whether the coupon can currently be redeemed
Last date the coupon can be redeemed
The billing provider this coupon is synced with
NONE, STRIPE, CHARGEBEE, PADDLE, SHOPIFY, WOOCOMMERCE, ZYLVIE, POLAR The affiliate program this coupon belongs to
When the coupon was created
When the coupon was last updated
Promotional codes that point at this coupon
Rule used to generate codes automatically for affiliates, if configured