Create Discount
Create a discount.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
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.
x > 0
Name of the discount. Will be displayed to the customer when the discount is applied.
1
The 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 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 > 1
List of product IDs the discount can be applied to.
The ID of the organization owning the discount. Required unless you use an organization token.
Response
Schema for a fixed amount discount that is applied once or forever.
once
, forever
, repeating
fixed
, percentage
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.
Was this page helpful?