Skip to main content
POST
Create a coupon

Authorizations

X-API-Key
string
header
required

Company API key. Send in the X-API-Key header.

Headers

x-client-id
string
required

Client identifier for the company in the request.

Example:

"client_abc123"

Body

application/json
code
string
required

Unique alphanumeric code (max 50 chars). Case-sensitive.

Example:

"SUMMER20"

name
string
required

Display name for the coupon (max 255 chars).

Example:

"20% off Summer Sale"

discount_type
enum<string>
required

How the discount is calculated.

Available options:
percentage,
fixed
Example:

"percentage"

discount_value
integer
required

Discount amount: percentage (1–100) when type is percentage; cents when type is fixed.

Example:

20

valid_from
string<date>
required

Date from which the coupon can be applied.

Example:

"2026-07-01"

description
string | null

Optional description (max 1000 chars).

Example:

"Applies to all monthly plans."

valid_until
string<date> | null

Expiry date (must be after valid_from). Null = no expiry.

Example:

"2026-08-31"

max_redemptions
integer | null

Maximum total uses across all subscriptions. Null = unlimited.

Example:

100

max_cycles
integer | null

Maximum billing cycles the discount applies per subscription. Null = applies forever.

Example:

3

Response

Coupon created

data
object