Create Discount Code
Headers
Body
The fixed value for the discount. Only applicable if the type is "fixed".
The duration type for the discount.
forever
, once
, repeating
The name of the discount.
The type of the discount, either "percentage" or "fixed".
percentage
, fixed
The list of product IDs to which this discount applies.
Optional discount code. If left empty, a code will be generated.
The currency of the discount. Only required if type is "fixed".
The number of months the discount is valid for. Only applicable if the duration is "repeating" and the product is a subscription.
The expiry date of the discount.
The maximum number of redemptions for the discount.
The percentage value for the discount. Only applicable if the type is "percentage".
Response
The amount of the discount. Can be a percentage or a fixed amount.
The discount code. A unique identifier for the discount.
Unique identifier for the object.
String representing the environment.
test
, live
, sandbox
The name of the discount.
A string representing the object’s type. Objects of the same type share the same value.
The status of the discount (e.g., active, inactive).
active
, draft
, expired
, scheduled
The type of the discount, either "percentage" or "fixed".
percentage
, fixed
The list of product IDs to which this discount applies.
The duration type for the discount.
forever
, once
, repeating
The number of months the discount is valid for. Only applicable if the duration is "repeating" and the product is a subscription.
The expiry date of the discount.
The maximum number of redemptions allowed for the discount.
The percentage of the discount. Only applicable if type is "percentage".