API Reference

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.

Log in to see full request history
Query Params
expand
array of strings

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]

expand
Body Params
float
required

The amount off (percentage or flat amount) for the Promo Code.

string
required

The monetary currency of the Promo Code.

string
required

The specific code used to apply the Promo Code at checkout.

string
required

Whether the Promo Code is a percentage or flat amount off.

int32

The date/time of when the Promo Code expires.

boolean
Defaults to false

Restricts Promo Code use to users who haven't purchased from the company before.

int32
Defaults to 0

The number of billing cycles the Promo Code is applied for. By default, it is applied forever (0).

plan_ids
array of strings

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.

plan_ids
int32

The number of total uses remaining for the Promo Code.

boolean

Whether or not the Promo Code has unlimited uses.

metadata
object

A key value pair of metadata. Whatever you put on here will be assigned to any memberships that are created on this plan

Headers
string

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 ***************************

Response

Language
Click Try It! to start a request and see the response here! Or choose an example:
application/json