> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# Promo Codes API

> Een Promo Code is een korting die een koper bij het afrekenen invoert, als percentage of als vast bedrag.

Een promotiecode hoort bij een account, kan worden beperkt tot één product en bepaalt wie hem kan inwisselen, hoe vaak, tot wanneer en voor hoeveel factureringsperiodes de korting geldt.

Gebruik de Promo Codes API om codes voor een account aan te maken, ze weer te geven en op te halen, een code te deactiveren om inwisselingen te pauzeren of weer te activeren, en codes te archiveren die je niet meer aanbiedt.

## Endpoints

| Endpoint | Verzoek |
| - | - |
| [Promo Codes weergeven](https://docs.whop.com/nl/api-reference/promo-codes/list-promo-codes.md) | GET `/promo_codes` |
| [Promo Code ophalen](https://docs.whop.com/nl/api-reference/promo-codes/retrieve-promo-code.md) | GET `/promo_codes/{id}` |
| [Promo Code aanmaken](https://docs.whop.com/nl/api-reference/promo-codes/create-promo-code.md) | POST `/promo_codes` |
| [Promo Code activeren](https://docs.whop.com/nl/api-reference/promo-codes/activate-promo-code.md) | POST `/promo_codes/{id}/activate` |
| [Promo Code deactiveren](https://docs.whop.com/nl/api-reference/promo-codes/deactivate-promo-code.md) | POST `/promo_codes/{id}/deactivate` |
| [Promo Code verwijderen](https://docs.whop.com/nl/api-reference/promo-codes/delete-promo-code.md) | DELETE `/promo_codes/{id}` |

## Attributen

**id** `string` *required*

Promotiecode-ID, met prefix `promo_`.

**account** `object` *required*

Account dat eigenaar is van de promotiecode.

> [accordion] Eigenschappen
>
> **id** `string` *required*
>
> Account-ID, met prefix `biz_`.
>
> **title** `string` *required*
>
> Weergavenaam van het account.

**affiliate** `object | null` *required*

Affiliate die wordt gecrediteerd voor verwijzingen die de promotiecode gebruiken, of `null` als er geen affiliate is gekoppeld.

> [accordion] Eigenschappen
>
> **id** `string` *required*
>
> Affiliate-ID, met prefix `aff_`.
>
> **user** `object` *required*
>
> Gebruiker die de affiliate is.
>
> > [accordion] Eigenschappen
> >
> > **id** `string` *required*
> >
> > Gebruikers-ID van de affiliate, met prefix `user_`.
> >
> > **name** `string | null` *required*
> >
> > Weergavenaam van de affiliate.
> >
> > **profile\_pic** `string` *required*
> >
> > Avatar-URL van de affiliate, inclusief de gegenereerde fallback als er geen
> > avatar is ingesteld.
> >
> > **username** `string | null` *required*
> >
> > Openbare gebruikersnaam van de affiliate.

**amount\_off** `number` *required*

Kortingsbedrag. Procentuele kortingen worden weergegeven als decimale breuk.

**churned\_users\_only** `boolean` *required*

Of de promotiecode is beperkt tot vertrokken klanten.

**code** `string | null` *required*

Code die bij het afrekenen wordt ingevoerd.

**created\_at** `string` *required*

Wanneer de promotiecode is aangemaakt, als ISO 8601-tijdstempel.

**currency** `string` *required*

Valuta die wordt gebruikt voor een korting met een vast bedrag.

Beschikbare opties: `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`, `kzt`, `awg`, `whop_usd`, `xau`, `hnl`

**duration** `string` *required*

Hoe lang de korting geldt.

Beschikbare opties: `forever`, `once`, `repeating`

**existing\_memberships\_only** `boolean` *required*

Of de promotiecode alleen geldt voor bestaande lidmaatschappen.

**expires\_at** `string | null` *required*

Wanneer de promotiecode verloopt, als ISO 8601-tijdstempel.

**metadata** `object` *required*

Aangepaste key-value-metadata die bij de promotiecode is opgeslagen.

**new\_users\_only** `boolean` *required*

Of de promotiecode is beperkt tot nieuwe klanten.

**one\_per\_customer** `boolean` *required*

Of elke klant de promotiecode maar één keer mag inwisselen.

**product** `object | null` *required*

Product waartoe de promotiecode is beperkt, of `null` als hij niet aan een product is gebonden.

> [accordion] Eigenschappen
>
> **id** `string` *required*
>
> Product-ID, met prefix `prod_`.
>
> **title** `string` *required*
>
> Weergavenaam van het product.

**promo\_duration\_months** `integer | null` *required*

Factureringsintervallen waarop de korting van toepassing is.

**promo\_type** `string` *required*

Of de korting procentueel is of een vast bedrag.

Beschikbare opties: `percentage`, `flat_amount`

**status** `string` *required*

Levenscyclusstatus van de promotiecode.

Beschikbare opties: `active`, `inactive`, `archived`

**stock** `integer` *required*

Maximaal aantal keren gebruik als de voorraad beperkt is.

**unlimited\_stock** `boolean` *required*

Of de promotiecode geen limiet voor inwisselingen heeft.

**updated\_at** `string` *required*

Wanneer de promotiecode is bijgewerkt, als ISO 8601-tijdstempel.

**uses** `integer` *required*

Lidmaatschappen die de promotiecode hebben gebruikt.

```json PromoCode theme={null}
{
	"id": "promo_xxxxxxxxxxxxxx",
	"code": "SUMMER25",
	"account": {
		"id": "biz_xxxxxxxxxxxxxx",
		"title": "Shine Time Auto Detailing"
	},
	"product": {
		"id": "prod_xxxxxxxxxxxxxx",
		"title": "Ceramic Coating Package"
	},
	"affiliate": {
		"id": "aff_xxxxxxxxxxxxxx",
		"user": {
			"id": "user_xxxxxxxxxxxxxx",
			"username": "danawhitfield",
			"name": "Dana Whitfield",
			"profile_pic": "https://ui-avatars.com/api/?name=Dana+Whitfield"
		}
	},
	"status": "active",
	"promo_type": "percentage",
	"amount_off": 0.25,
	"currency": "usd",
	"duration": "repeating",
	"promo_duration_months": 3,
	"new_users_only": true,
	"churned_users_only": false,
	"existing_memberships_only": false,
	"one_per_customer": true,
	"unlimited_stock": false,
	"stock": 200,
	"uses": 37,
	"expires_at": "2026-12-31T23:59:59.000Z",
	"metadata": {},
	"created_at": "2026-09-01T12:00:00.000Z",
	"updated_at": "2026-09-01T12:00:00.000Z"
}
```
