Promo Codes
Create Promo Code
Changed onCreates a promo code for an account.
post/promo_codes
Request
- Base URL: https://api.whop.com/api/v1
- URL: https://api.whop.com/api/v1/promo_codes
- Auth: HTTP bearer
Headers
Idempotency-Keystring
Example:d9105228-4a08-46b1-8b91-42fed586d383
A unique key that makes this request safe to retry. See Idempotent requests.
Request body
Example request
{
"account_id": "biz_xxxxxxxxxxxxxx",
"amount_off": 25,
"base_currency": "usd",
"code": "AFFILIATE25",
"expires_at": "2026-01-01T12:00:00.000Z",
"new_users_only": true,
"one_per_customer": true,
"plan_ids": [
"plan_xxxxxxxxxxxxxx"
],
"product_id": "prod_xxxxxxxxxxxxxx",
"promo_duration_months": 3,
"promo_type": "percentage",
"stock": 200
}Response
promo code created
Example response
{
"account": {
"id": "biz_xxxxxxxxxxxxxx",
"title": "Shine Time Auto Detailing"
},
"amount_off": 0.25,
"code": "affiliate25",
"created_at": "2026-01-01T12:00:00.000Z",
"currency": "usd",
"duration": "repeating",
"expires_at": "2026-01-01T12:00:00.000Z",
"id": "promo_xxxxxxxxxxxxxx",
"metadata": {},
"new_users_only": true,
"one_per_customer": true,
"product": {
"id": "prod_xxxxxxxxxxxxxx",
"title": "Ceramic Coating Package"
},
"promo_duration_months": 3,
"promo_type": "percentage",
"status": "active",
"stock": 200,
"updated_at": "2026-01-01T12:00:00.000Z"
}Changes
- info
added the non-success response with the status
- info
- info
added the optional property
/to the response with the status
- info