Headers
Body
The name of the discount.
"Holiday Sale"
The type of the discount, either "percentage" or "fixed".
percentage
, fixed
The duration type for the discount.
forever
, once
, repeating
"repeating"
The list of product IDs to which this discount applies.
["prod_123", "prod_456"]
Optional discount code. If left empty, a code will be generated.
"HOLIDAY2024"
The fixed value for the discount. Only applicable if the type is "fixed".
20
The currency of the discount. Only required if type is "fixed".
"USD"
The percentage value for the discount. Only applicable if the type is "percentage".
15
The expiry date of the discount.
"2024-12-31T23:59:59Z"
The maximum number of redemptions for the discount.
100
The number of months the discount is valid for. Only applicable if the duration is "repeating" and the product is a subscription.
6
Response
Successfully created a discount
Unique identifier for the object.
String representing the environment.
test
, prod
, sandbox
A string representing the object’s type. Objects of the same type share the same value.
"discount"
The status of the discount (e.g., active, inactive).
active
, draft
, expired
, scheduled
"active"
The name of the discount.
"Holiday Sale"
The discount code. A unique identifier for the discount.
"HOLIDAY2024"
The type of the discount, either "percentage" or "fixed".
percentage
, fixed
"percentage"
The amount of the discount. Can be a percentage or a fixed amount.
20
The currency of the discount. Only required if type is "fixed".
"USD"
The percentage of the discount. Only applicable if type is "percentage".
15
The expiry date of the discount.
"2024-12-31T23:59:59Z"
The maximum number of redemptions allowed for the discount.
100
The duration type for the discount.
forever
, once
, repeating
"repeating"
The number of months the discount is valid for. Only applicable if the duration is "repeating" and the product is a subscription.
6
The list of product IDs to which this discount applies.
["prod_123", "prod_456"]