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
Coupon details
Name of the coupon
External ID (e.g., Stripe coupon ID)
Type of discount - percentage or flat amount (default: PERCENTAGE)
PERCENTAGE
, FLAT
Percentage off (1-100) - required for percentage coupons
Amount off - required for flat coupons
Currency (e.g., USD, EUR) - required for flat coupons
How long the discount applies (default: forever)
once
, forever
, repeating
Number of months - required for repeating duration
Maximum number of times this coupon can be redeemed
Whether coupon is limited to specific products (default: false)
Array of product IDs this coupon applies to
Whether the coupon is currently valid (default: true)
Date by which the coupon must be redeemed
Integration type (e.g., stripe, custom)
Response
Coupon created successfully
The coupon ID
Name of the coupon
External ID (e.g., Stripe coupon ID)
Type of discount - percentage or flat amount
PERCENTAGE
, FLAT
Percentage off (1-100) for percentage coupons
Amount off for flat coupons
Currency for flat amount coupons (e.g., USD, EUR)
How long the discount applies
once
, forever
, repeating
Number of months for repeating duration
Maximum number of times this coupon can be redeemed
Whether coupon is limited to specific products
Array of product IDs this coupon applies to
Whether the coupon is currently valid
Date by which the coupon must be redeemed
Integration type (e.g., stripe, custom)
The affiliate program ID
Timestamp when the coupon was created
Timestamp when the coupon was last updated
Promotional codes associated with this coupon