Create a discount.
Scopes: discounts:write
Documentation Index
Fetch the complete documentation index at: https://polar.sh/docs/llms.txt
Use this file to discover all available pages before exploring further.
You can generate an Organization Access Token from your organization's settings.
Schema to create a fixed amount discount.
Name of the discount. Will be displayed to the customer when the discount is applied.
1For subscriptions, determines if the discount should be applied once on the first invoice, forever, or for a certain number of months determined by duration_in_months.
once, forever, repeating 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:
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 organization ID.
"1dbfc517-0bbf-4301-9ba8-555ca42b9737"
"fixed"Number of months the discount should be applied.
Required when duration is repeating. Must be omitted otherwise.
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.
1 <= x <= 999Fixed amount to discount from the invoice total.
0 <= x <= 999999999999The currency of the fixed amount discount.
aed, all, amd, aoa, ars, aud, awg, azn, bam, bbd, bdt, bif, bmd, bnd, bob, brl, bsd, bwp, bzd, cad, cdf, chf, clp, cny, cop, crc, cve, czk, djf, dkk, dop, dzd, egp, etb, eur, fjd, fkp, gbp, gel, gip, gmd, gnf, gtq, gyd, hkd, hnl, htg, huf, idr, ils, inr, isk, jmd, jpy, kes, kgs, khr, kmf, krw, kyd, kzt, lak, lkr, lrd, lsl, mad, mdl, mga, mkd, mnt, mop, mur, mvr, mwk, mxn, myr, mzn, nad, ngn, nio, nok, npr, nzd, pab, pen, pgk, php, pkr, pln, pyg, qar, ron, rsd, rwf, sar, sbd, scr, sek, sgd, shp, sos, srd, szl, thb, tjs, top, try, ttd, twd, tzs, uah, ugx, usd, uyu, uzs, vnd, vuv, wst, xaf, xcd, xcg, xof, xpf, yer, zar, zmw Map of currency to fixed amount to discount from the total. This allows specifying different discount amounts for different currencies.
Discount created.
Schema for a fixed amount discount that is applied once or forever.
once, forever, repeating fixed, percentage 1000
"usd"
Map of currency to fixed amount to discount from the total.
{ "eur": 900, "usd": 1000 }
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"