Create Discount Code
Headers
Body
The name of the discount.
The type of the discount, either "percentage" or "fixed".
percentage
, fixed
The fixed value for the discount. Only applicable if the type is "fixed".
The duration type for the discount.
forever
, once
, repeating
Optional discount code. If left empty, a code will be generated.
The currency of the discount. Only required if type is "fixed".
The percentage value for the discount. Only applicable if the type is "percentage".
The expiry date of the discount.
The maximum number of redemptions for the discount.
The number of months the discount is valid for. Only applicable if the duration is "repeating" and the product is a subscription.
The list of product IDs to which this discount applies.
Response
Unique identifier for the object.
String representing the environment.
test
, live
, sandbox
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 name of the discount.
The discount code. A unique identifier for the discount.
The type of the discount, either "percentage" or "fixed".
percentage
, fixed
The amount of the discount. Can be a percentage or a fixed amount.
The percentage of the discount. Only applicable if type is "percentage".
The expiry date of the discount.
The maximum number of redemptions allowed for the discount.
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 list of product IDs to which this discount applies.