Update Discount
Update a discount.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The discount ID.
Body
Schema to update a discount.
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.
Name of the discount. Will be displayed to the customer when the discount is applied.
1
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
once
, forever
, repeating
Number of months the discount should be applied.
For this to work on yearly pricing, you should multiply this by 12. For example, to apply the discount for 2 years, set this to 24.
x > 1
fixed
, percentage
Fixed amount to discount from the invoice total.
x > 0
The currency. Currently, only usd
is supported.
Discount percentage in basis points.
A basis point is 1/100th of a percent. For example, to create a 25.5% discount, set this to 2550.
1 < x < 10000
List of product IDs the discount can be applied to.
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?