Create a new promo code that applies a discount at checkout. Can be scoped to specific products or plans.
Required permissions:
promo_code:createaccess_pass:basic:readA company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
Parameters for CreatePromoCode
The discount amount. When promo_type is percentage, this is the percent off (e.g., 20 for 20% off). When promo_type is flat_amount, this is the currency amount off (e.g., 10.00 for $10.00 off).
6.9
The three-letter ISO currency code for the promo code discount.
usd, sgd, inr, aud, brl, cad, dkk, eur, nok, gbp, sek, chf, hkd, huf, jpy, mxn, myr, pln, czk, nzd, aed, eth, ape, cop, ron, thb, bgn, idr, dop, php, try, krw, twd, vnd, pkr, clp, uyu, ars, zar, dzd, tnd, mad, kes, kwd, jod, all, xcd, amd, bsd, bhd, bob, bam, khr, crc, xof, egp, etb, gmd, ghs, gtq, gyd, ils, jmd, mop, mga, mur, mdl, mnt, nad, ngn, mkd, omr, pyg, pen, qar, rwf, sar, rsd, lkr, tzs, ttd, uzs, rub, btc, cny, usdt The alphanumeric code customers enter at checkout to apply the discount.
The unique identifier of the company to create this promo code for.
"biz_xxxxxxxxxxxxxx"
Whether to restrict this promo code to only users who have never purchased from the company before.
The number of billing months the discount remains active. For example, 3 means the discount applies to the first 3 billing cycles.
42
The discount type, either percentage or flat_amount.
percentage, flat_amount Whether to restrict this promo code to only users who have previously churned from the company.
Whether this promo code can only be applied to existing memberships, such as for cancellation retention offers.
The datetime when the promo code expires and can no longer be used. Null means it never expires.
"2023-12-01T05:00:00.401Z"
Whether each customer can only use this promo code once.
The identifiers of plans this promo code applies to. When product_id is also provided, only plans attached to that product are included.
Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.
The identifier of the product to scope this promo code to. When provided, the promo code only applies to plans attached to this product.
"prod_xxxxxxxxxxxxx"
The maximum number of times this promo code can be used. Ignored when unlimited_stock is true.
42
Whether the promo code can be used an unlimited number of times.
A successful response
A promo code applies a discount to a plan during checkout. Promo codes can be percentage-based or fixed-amount, and can have usage limits and expiration dates.
The unique identifier for the promo code.
"promo_xxxxxxxxxxxx"
The discount amount. Interpretation depends on promo_type: if 'percentage', this is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars off (e.g., 10.00 means $10.00 off).
6.9
The monetary currency of the promo code.
usd, sgd, inr, aud, brl, cad, dkk, eur, nok, gbp, sek, chf, hkd, huf, jpy, mxn, myr, pln, czk, nzd, aed, eth, ape, cop, ron, thb, bgn, idr, dop, php, try, krw, twd, vnd, pkr, clp, uyu, ars, zar, dzd, tnd, mad, kes, kwd, jod, all, xcd, amd, bsd, bhd, bob, bam, khr, crc, xof, egp, etb, gmd, ghs, gtq, gyd, ils, jmd, mop, mga, mur, mdl, mnt, nad, ngn, mkd, omr, pyg, pen, qar, rwf, sar, rsd, lkr, tzs, ttd, uzs, rub, btc, cny, usdt Restricts promo use to only users who have churned from the company before.
The specific code used to apply the promo at checkout.
The datetime the promo code was created.
"2023-12-01T05:00:00.401Z"
Restricts promo use to only be applied to already purchased memberships.
The duration of the promo.
forever, once, repeating The date/time of when the promo expires.
"2023-12-01T05:00:00.401Z"
Restricts promo use to only users who have never purchased from the company before.
The number of months the promo is applied for.
42
Restricts promo use to only be applied once per customer.
The product this promo code applies to
The type (% or flat amount) of the promo.
percentage, flat_amount Indicates if the promo code is live or disabled.
active, inactive, archived The quantity limit on the number of uses.
42
Whether or not the promo code has unlimited stock.
The amount of times the promo codes has been used.
42
The company for the promo code.