Update a discount
Toggles a discount on or off. Every other field is immutable after creation.
Authorizations
The Server API Key obtained from the kelviq application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'
Path Parameters
Discount UUID.
Body
Discounts only support toggling isActive after creation; every other field is immutable.
Response
Updated discount.
"b3f1a2c4-5d6e-4f7a-8b9c-0d1e2f3a4b5c"
PERCENTAGE discounts a percentage off the price. FIXED_AMOUNT discounts a flat amount off the total.
PERCENTAGE, FIXED_AMOUNT Amount to discount, in currency units (e.g. "10.00"). Set when discountType is FIXED_AMOUNT.
"10.00"
Percentage to discount. Set when discountType is PERCENTAGE.
20
3-letter ISO currency code. Required when discountType is FIXED_AMOUNT.
"usd"
"$"
Displayed on the customer's invoice.
"Summer Sale"
Checkout discount code. Uppercase letters and numbers only.
"SUMMER20"
How many billing cycles the discount applies for.
ONCE, REPEATING, FOREVER Number of billing periods the discount applies for. Despite the field name, this counts billing cycles, not calendar months — e.g. 3 on a yearly plan means 3 years. Set when duration is REPEATING.
UTC time after which this discount can no longer be redeemed.
Total number of times this code can be redeemed across all customers.
Number of times this code has been redeemed so far.
Products/plans this discount is restricted to. Empty means the discount applies to all products.