Create a promo code
Creates a new promo code with the given parameters. A promo code can offer a discount or a free period for a specific set of plans or for all plans in your company.
Headers
Your API key, which can be found on the Whop Business Dashboard. You must prepend your key with the word 'Bearer', which will look like Bearer ***************************
Query Parameters
Whether or not to expand the Plans on the returned Promo Code(s). Pass an array with each object(s) you want to expand, e.g. [plans]
plans
, promo_code
Body
Creates a promo code
The amount off (percentage or flat amount) for the Promo Code.
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
The specific code used to apply the Promo Code at checkout.
Whether the Promo Code is a percentage or flat amount off.
percentage
, flat_amount
The date/time of when the Promo Code expires.
Restricts Promo Code use to users who haven't purchased from the company before.
The number of billing cycles the Promo Code is applied for. By default, it is applied forever (0).
The IDs of plans associated with the Promo Code. Use JSON as your content-type when setting this. Form encoded data will not work well with arrays.
The number of total uses remaining for the Promo Code.
Whether or not the Promo Code has unlimited uses.
A key value pair of metadata. Whatever you put on here will be assigned to any memberships that are created on this plan
Response
PromoCode model
The ID of the Promo Code, which will look like promo_*************
The Plans this Promo Code is valid for. By default this will just be the IDs of the Plans, but you can expand it to get more information about the Plan by passing [plan]
in the expand
parameter.
The amount off (percentage or flat amount) for the Promo Code.
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
The specific code used to apply the Promo Code at checkout.
Restricts Promo Code use to users who haven't purchased from the company before.
The number of billing cycles the Promo Code is applied for. By default, it is applied forever (0).
Please use plans
instead, as this field is deprecated.
Whether the Promo Code is a percentage or flat amount off.
percentage
, flat_amount
Indicates if the Promo Code is live, disabled, or archived.
active
, inactive
, archived
The number of total uses remaining for the Promo Code.
Whether or not the Promo Code has unlimited uses.
The amount of times the Promo Code has been used.
The time at which the Promo Code was created. Measured in seconds since the Unix epoch.
The date/time of when the Promo Code expires.
A polymorphic object containing information that can be user defined
The duration setting for the promo code.
forever
, once
, repeating
If true, the promo code can only be applied to existing memberships (post checkout).
Was this page helpful?