v6
latestOpenAPI 3.1.02026-07-311856741.1 MBUpdate Discount
Update a discount.
Scopes: discounts:write
Path parameters
The discount ID.
The discount ID.
Request body
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.
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. 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.
Optional maximum number of times the discount can be redeemed by a single customer.
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.
Fixed amount to discount from the invoice total.
Map of currency to fixed amount to discount from the total. This allows specifying different discount amounts for different currencies.
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.
List of product IDs the discount can be applied to.
Response
Discount updated.
Example response
{
"amount": 1000,
"currency": "usd",
"amounts": {
"eur": 900,
"usd": 1000
},
"organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
}