Skip to main content
POST
Create voucher
Required scope: 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

If your API key is location-scoped, the new voucher is forced to that location. Supplying a different location_id returns 403 Forbidden.

Response

Errors

  • 403 – API key is scoped to a different location than location_id.
  • 404location_id does not match an active location in your tenant.
  • 409Idempotency-Key reused 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).

Examples