Skip to main content
POST
Create a coupon

Authorizations

x-api-key
string
header
required

Your Store API key (pk_live_...). Create it in Developers › API keys.

x-store-hash
string
header
required

The ID of the store the request is for. Shown in Developers › API keys.

Headers

Idempotency-Key
string

Unique key (for example a UUID) that makes retries safe. The first response is stored for 24 hours and replayed for retries with the same key and body.

Maximum string length: 255

Body

application/json
code
string
required

Uppercased. A–Z, 0–9, _, -.

Maximum string length: 64
Example:

"SUMMER20"

type
enum<string>
required
Available options:
percent,
fixed
value
integer
required

1–100 for percent; minor units for fixed.

max_uses
integer | null
Required range: x >= 1
require_purchase
boolean
valid_from
string<date-time> | null
Example:

"2026-10-04T12:00:00.000Z"

valid_to
string<date-time> | null

Must be after valid_from.

Example:

"2026-10-04T12:00:00.000Z"

status
enum<string>
default:active
Available options:
active,
inactive
product_ids
(integer | string)[]

Product IDs or hash IDs of this store (max 1000). Replaces the current list; [] or null clears it.

disabled_payment_methods
string[]
Maximum array length: 100

Response

Created

success
boolean
required
Example:

true

coupon
object