polar discounts <subcommand> [flags]
polar discounts createCreate a discount.polar discounts deleteDelete a discount.polar discounts getGet a discount by ID.polar discounts listList discounts.polar discounts updateUpdate a discount.
polar discounts create
Create a discount.polar discounts create [flags]
| Flag | Type | Description |
|---|---|---|
--data, -d | string | JSON object; explicitly supplied flags override its top-level keys |
--metadata | string | Key-value object allowing you to store additional information. JSON: {“<key>”: string | integer | number | boolean} |
--name | string | Required. Name of the discount. Will be displayed to the customer when the discount is applied. |
--code | string | 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. |
--starts-at | string | Optional timestamp after which the discount is redeemable. |
--ends-at | string | Optional timestamp after which the discount is no longer redeemable. |
--max-redemptions | integer | Optional maximum number of times the discount can be redeemed. |
--max-redemptions-per-customer | integer | Optional maximum number of times the discount can be redeemed by a single customer. |
--products | string | products |
--organization-id, --org | string | The ID of the organization owning the discount. Defaults to the active organization. |
--type | choice | type (choices: fixed, percentage) |
--duration | choice | Required. For 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. (choices: once, forever, repeating) |
--duration-in-months | integer | Number of months the discount should be applied. |
--amount | integer | amount |
--currency | choice | currency (choices: 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) |
--amounts | string | amounts JSON: {“<key>”: integer} |
--basis-points | integer | Discount percentage in basis points. |
polar discounts delete
Delete a discount.polar discounts delete [flags] <id>
| Argument | Type | Description |
|---|---|---|
id | string |
| Flag | Type | Description |
|---|---|---|
--confirm, -c | boolean | Skip the confirmation prompt for destructive requests |
polar discounts get
Get a discount by ID.polar discounts get [flags] <id>
| Argument | Type | Description |
|---|---|---|
id | string |
polar discounts list
List discounts.polar discounts list [flags]
| Flag | Type | Description |
|---|---|---|
--data, -d | string | JSON object; explicitly supplied flags override its top-level keys |
--organization-id, --org | string | Filter by organization ID. Defaults to the active organization. |
--query | string | Filter by name. |
--page | integer | Page number, defaults to 1. |
--limit | integer | Size of a page, defaults to 10. Maximum is 100. |
--sorting | choice | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order. (choices: created_at, -created_at, name, -name, code, -code, redemptions_count, -redemptions_count, ends_at, -ends_at) |
polar discounts update
Update a discount.polar discounts update [flags] <id>
| Argument | Type | Description |
|---|---|---|
id | string |
| Flag | Type | Description |
|---|---|---|
--data, -d | string | JSON object; explicitly supplied flags override its top-level keys |
--metadata | string | Key-value object allowing you to store additional information. JSON: {“<key>”: string | integer | number | boolean} |
--name | string | name |
--code | string | 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. |
--starts-at | string | Optional timestamp after which the discount is redeemable. |
--ends-at | string | Optional timestamp after which the discount is no longer redeemable. |
--max-redemptions | integer | Optional maximum number of times the discount can be redeemed. |
--max-redemptions-per-customer | integer | Optional maximum number of times the discount can be redeemed by a single customer. |
--duration | choice | duration (choices: once, forever, repeating) |
--duration-in-months | integer | duration_in_months |
--type | choice | type (choices: fixed, percentage) |
--amount | integer | amount |
--currency | choice | currency (choices: 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) |
--amounts | string | amounts JSON: {“<key>”: integer} |
--basis-points | integer | basis_points |
--products | string | products |

