Authorizations
You can generate an Organization Access Token from your organization's settings.
Body
- DiscountFixedOnceForeverDurationCreate
- DiscountFixedRepeatDurationCreate
- DiscountPercentageOnceForeverDurationCreate
- DiscountPercentageRepeatDurationCreate
Schema to create a fixed amount discount that is applied once or forever.
once, forever, repeating Type of the discount.
fixed, percentage Fixed amount to discount from the invoice total.
0 <= x <= 999999999999Name of the discount. Will be displayed to the customer when the discount is applied.
1The currency. Currently, only usd is supported.
Key-value object allowing you to store additional information.
The key must be a string with a maximum length of 40 characters. The value must be either:
- A string with a maximum length of 500 characters
- An integer
- A floating-point number
- A boolean
You can store up to 50 key-value pairs.
Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.
Optional timestamp after which the discount is redeemable.
Optional timestamp after which the discount is no longer redeemable.
Optional maximum number of times the discount can be redeemed.
x >= 1List of product IDs the discount can be applied to.
The ID of the organization owning the discount. Required unless you use an organization token. The organization ID.
"1dbfc517-0bbf-4301-9ba8-555ca42b9737"
Response
Discount created.
- DiscountFixedOnceForeverDuration
- DiscountFixedRepeatDuration
- DiscountPercentageOnceForeverDuration
- DiscountPercentageRepeatDuration
Schema for a fixed amount discount that is applied once or forever.
once, forever, repeating fixed, percentage 1000
"usd"
Creation timestamp of the object.
Last modification timestamp of the object.
The ID of the object.
Name of the discount. Will be displayed to the customer when the discount is applied.
Code customers can use to apply the discount during checkout.
Timestamp after which the discount is redeemable.
Timestamp after which the discount is no longer redeemable.
Maximum number of times the discount can be redeemed.
Number of times the discount has been redeemed.
The organization ID.
"1dbfc517-0bbf-4301-9ba8-555ca42b9737"

