Skip to main content
POST
Create a promo code

Authorizations

Authorization
string
header
required

Paste your secret key as the bearer token: sk_test_… (test) or sk_live_… (live). That is all a normal API call needs. OAuth access tokens from POST /v1/oauth/token also work, but a client id/secret is only for platforms acting on another tenant's behalf, not for your own integration.

Body

application/json
code
string
required
Example:

"LAUNCH50"

discountType
enum<string>
required
Available options:
percentage,
fixed
discountValue
integer
required

Percent (≤100) or minor units.

planId
string
duration
enum<string>
default:once
Available options:
once,
forever,
repeating
durationCycles
integer
maxRedemptions
integer
expiresAt
string<date-time>

Response

201 - application/json

Created

id
string
code
string
discountType
string
discountValue
integer
duration
string
redeemedCount
integer
remaining
integer | null
active
boolean
expiresAt
string | null
createdAt
string