Create voucher
Vouchers
Create voucher
Create a new completed voucher with the next sequential code.
POST
Create voucher
Required scope:
If your API key is location-scoped, the new voucher is forced to that
location. Supplying a different
vouchers:write
Rate limit: 60 requests/minute
Status code on success: 201 Created
Idempotency: supported – pass Idempotency-Key to safely retry. See Idempotency.
The new voucher is created in the completed status – i.e. ready to redeem
immediately. The voucher code is generated server-side; you cannot supply it.
The expiry date is calculated from your tenant’s configured voucher expiry
window (default: 3 years).
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
amount | decimal (string) | yes | Greater than 0, less than or equal to 10000 |
purchaser_name | string | yes | 1–255 characters |
purchaser_email | string (email) | no | If supplied, a Customer is found-or-created and linked |
recipient_name | string | no | Up to 255 characters |
recipient_email | string (email) | no | Stored encrypted; used for delivery if you wire it up |
personal_message | string | no | Up to 1000 characters |
notes | string | no | Internal notes – accepted but not returned in the response |
location_id | UUID | no | Required only when creating a location-specific voucher with a tenant-wide key |
location_id returns 403 Forbidden.
Response
Errors
403– API key is scoped to a different location thanlocation_id.404–location_iddoes not match an active location in your tenant.409–Idempotency-Keyreused with a different request body within the 24h replay window (see Idempotency).422– Validation error on any field (e.g.amount <= 0,amount > 10000, invalid email format).