Skip to main content
Reserve a voucher within a payment context — returns a 6-digit voucher code.
POST /api/v1/vouchers/reserve-voucher The payee reserves a voucher using the context code the payer shared with them. The response includes a 6-digit voucher code and a voucher ID. The voucher starts in RESERVED status. This endpoint accepts both resource-based tokens (from context code authentication) and registered user tokens.

Parameters

Body

NameTypeRequiredDescription
codestringYesThe context code shared by the payer. 6 characters.

Request example

curl --request POST 'https://payments.bleepay.com/api/v1/vouchers/reserve-voucher' \
  --header 'Authorization: Bearer <payee_token>' \
  --header 'Content-Type: application/json' \
  --data '{ "code": "A1B2C3" }'

Response

Response schema

FieldTypeDescription
idstringUnique voucher identifier
codestring6-digit voucher code
statusstringVoucher status — RESERVED
expiresAtstringISO 8601 expiry timestamp

Example response

{
  "id": "vch_482916",
  "code": "482916",
  "status": "RESERVED",
  "expiresAt": "2026-06-09T12:02:00.000Z"
}

Error responses

StatusCodeDescription
400invalid_codeThe context code is invalid or expired
401unauthorizedMissing or invalid bearer token
404not_foundContext not found