Skip to main content
The Vouchers API returns structured error objects on failed requests. This page covers the response format, validation error codes, and general business logic error codes.

Response Format

Failed requests return an error object:
422 Unprocessable Entity responses include a list of field-level errors:

Validation Error Codes

These appear in the errors array of 422 responses.

Client

Errors returned when connecting a client.

Connect

CodeMessage
CLIENT.CONNECT.PIN.REQUIREDThe pin field is required.
CLIENT.CONNECT.PIN.STRINGThe pin must be a string.

Voucher

Errors returned when creating, updating, deleting, recharging, or changing the status of a voucher.

Create

CodeMessage
VOUCHER.CREATE.CUSTOM_ID.STRINGThe custom_id must be a string.
VOUCHER.CREATE.CUSTOM_ID.MAX:255The custom_id may not be greater than 255 characters.
VOUCHER.CREATE.CUSTOM_ID.UNIQUEThe custom_id has already been taken.
VOUCHER.CREATE.CODE.STRINGThe code must be a string.
VOUCHER.CREATE.CODE.MAX:255The code may not be greater than 255 characters.
VOUCHER.CREATE.CODE.UNIQUEThe code has already been taken.
VOUCHER.CREATE.SKU.STRINGThe sku must be a string.
VOUCHER.CREATE.SKU.MAX:255The sku may not be greater than 255 characters.
VOUCHER.CREATE.PIN.STRINGThe pin must be a string.
VOUCHER.CREATE.PIN.MAX:255The pin may not be greater than 255 characters.
VOUCHER.CREATE.BATCH.STRINGThe batch must be a string.
VOUCHER.CREATE.BATCH.MAX:30The batch may not be greater than 30 characters.
VOUCHER.CREATE.AMOUNT.REQUIREDThe amount field is required.
VOUCHER.CREATE.AMOUNT.STRINGThe amount must be a string.
VOUCHER.CREATE.AMOUNT.NUMERICThe amount must be a number.
VOUCHER.CREATE.AMOUNT.MIN:0The amount must be at least 0.
VOUCHER.CREATE.AMOUNT.VALID_CURRENCY_AMOUNTAmount must have exactly two decimals.
VOUCHER.CREATE.STATUS.VALID_VOUCHER_STATUSVoucher status can only be: inactive, active.
VOUCHER.CREATE.CURRENCY.REQUIREDThe currency field is required.
VOUCHER.CREATE.CURRENCY.VALID_CURRENCYCurrency must be a valid currency code.
VOUCHER.CREATE.VALIDITY_VALUE.NUMERICThe validity_value must be a number.
VOUCHER.CREATE.VALIDITY_VALUE.GT:0The validity_value must be greater than 0.
VOUCHER.CREATE.VALIDITY_INTERVAL.STRINGThe validity_interval must be a string.
VOUCHER.CREATE.VALIDITY_INTERVAL.VALID_VOUCHER_VALIDITY_INTERVALVoucher validity interval can only be: days, weeks, months, years.
VOUCHER.CREATE.TYPE.VALID_VOUCHER_TYPEVoucher types can only be: print, digital.
VOUCHER.CREATE.TAXABLE.BOOLEANThe taxable field must be true or false.
VOUCHER.CREATE.TAX_RATE.REQUIRED_IF:TAXABLE,TRUEThe tax_rate field is required when taxable is true.
VOUCHER.CREATE.TAX_RATE.NUMERICThe tax_rate must be a number.
VOUCHER.CREATE.TAX_RATE.BETWEEN:0,100The tax_rate must be between 0 and 100.
VOUCHER.CREATE.ORDER_NUMBER.STRINGThe order_number must be a string.
VOUCHER.CREATE.ORDER_NUMBER.MAX:255The order_number may not be greater than 255 characters.
VOUCHER.CREATE.DATA.JSONThe data must be a valid JSON string.

Delete

CodeMessage
VOUCHER.DELETE.COMMENT.REQUIREDThe comment field is required.
VOUCHER.DELETE.COMMENT.STRINGThe comment must be a string.
VOUCHER.DELETE.COMMENT.MAX:255The comment may not be greater than 255 characters.

Recharge

CodeMessage
VOUCHER.RECHARGE.AMOUNT.REQUIREDThe amount field is required.
VOUCHER.RECHARGE.AMOUNT.STRINGThe amount must be a string.
VOUCHER.RECHARGE.AMOUNT.NUMERICThe amount must be a number.
VOUCHER.RECHARGE.AMOUNT.BETWEEN:0.01,99999The amount must be between 0.01 and 99999.
VOUCHER.RECHARGE.AMOUNT.VALID_CURRENCY_AMOUNTAmount must have exactly two decimals.
VOUCHER.RECHARGE.CURRENCY.REQUIREDThe currency field is required.
VOUCHER.RECHARGE.CURRENCY.VALID_CURRENCYCurrency must be a valid currency code.
VOUCHER.RECHARGE.ORDER_NUMBER.REQUIREDThe order_number field is required.
VOUCHER.RECHARGE.ORDER_NUMBER.STRINGThe order_number must be a string.

Status

CodeMessage
VOUCHER.STATUS.STATUS.REQUIREDThe status field is required.
VOUCHER.STATUS.STATUS.VALID_VOUCHER_STATUSVoucher status can only be: inactive, active.

Update

CodeMessage
VOUCHER.UPDATE.CUSTOM_ID.STRINGThe custom_id must be a string.
VOUCHER.UPDATE.CUSTOM_ID.MAX:255The custom_id may not be greater than 255 characters.
VOUCHER.UPDATE.CUSTOM_ID.UNIQUEThe custom_id has already been taken.
VOUCHER.UPDATE.CODE.STRINGThe code must be a string.
VOUCHER.UPDATE.CODE.MAX:255The code may not be greater than 255 characters.
VOUCHER.UPDATE.CODE.UNIQUEThe code has already been taken.
VOUCHER.UPDATE.SKU.STRINGThe sku must be a string.
VOUCHER.UPDATE.SKU.MAX:255The sku may not be greater than 255 characters.
VOUCHER.UPDATE.PIN.STRINGThe pin must be a string.
VOUCHER.UPDATE.PIN.MAX:255The pin may not be greater than 255 characters.
VOUCHER.UPDATE.BATCH.STRINGThe batch must be a string.
VOUCHER.UPDATE.BATCH.MAX:30The batch may not be greater than 30 characters.
VOUCHER.UPDATE.AMOUNT.STRINGThe amount must be a string.
VOUCHER.UPDATE.AMOUNT.NUMERICThe amount must be a number.
VOUCHER.UPDATE.AMOUNT.MIN:0The amount must be at least 0.
VOUCHER.UPDATE.AMOUNT.VALID_CURRENCY_AMOUNTAmount must have exactly two decimals.
VOUCHER.UPDATE.STATUS.VALID_VOUCHER_STATUSVoucher status can only be: inactive, active.
VOUCHER.UPDATE.CURRENCY.VALID_CURRENCYCurrency must be a valid currency code.
VOUCHER.UPDATE.VALIDITY_VALUE.NUMERICThe validity_value must be a number.
VOUCHER.UPDATE.VALIDITY_INTERVAL.STRINGThe validity_interval must be a string.
VOUCHER.UPDATE.VALIDITY_INTERVAL.VALID_VOUCHER_VALIDITY_INTERVALVoucher validity interval can only be: days, weeks, months, years.
VOUCHER.UPDATE.TYPE.VALID_VOUCHER_TYPEVoucher types can only be: print, digital.
VOUCHER.UPDATE.TAXABLE.BOOLEANThe taxable field must be true or false.
VOUCHER.UPDATE.TAX_RATE.REQUIRED_IF:TAXABLE,TRUEThe tax_rate field is required when taxable is true.
VOUCHER.UPDATE.TAX_RATE.NUMERICThe tax_rate must be a number.
VOUCHER.UPDATE.TAX_RATE.BETWEEN:0,100The tax_rate must be between 0 and 100.
VOUCHER.UPDATE.ORDER_NUMBER.STRINGThe order_number must be a string.
VOUCHER.UPDATE.ORDER_NUMBER.MAX:255The order_number may not be greater than 255 characters.
VOUCHER.UPDATE.DATA.JSONThe data must be a valid JSON string.

VoucherCharge

Errors returned when refunding a charge.

Refund

CodeMessage
VOUCHERCHARGE.REFUND.AMOUNT.REQUIREDThe amount field is required.
VOUCHERCHARGE.REFUND.AMOUNT.STRINGThe amount must be a string.
VOUCHERCHARGE.REFUND.AMOUNT.NUMERICThe amount must be a number.
VOUCHERCHARGE.REFUND.AMOUNT.BETWEEN:0.01,0The amount must be between 0.01 and the charged amount.
VOUCHERCHARGE.REFUND.AMOUNT.VALID_CURRENCY_AMOUNTAmount must have exactly two decimals.
VOUCHERCHARGE.REFUND.CURRENCY.REQUIREDThe currency field is required.
VOUCHERCHARGE.REFUND.CURRENCY.VALID_CURRENCYCurrency must be a valid currency code.

VoucherReservation

Errors returned when creating or charging a reservation.

Create

CodeMessage
VOUCHERRESERVATION.CREATE.AMOUNT.REQUIREDThe amount field is required.
VOUCHERRESERVATION.CREATE.AMOUNT.STRINGThe amount must be a string.
VOUCHERRESERVATION.CREATE.AMOUNT.NUMERICThe amount must be a number.
VOUCHERRESERVATION.CREATE.AMOUNT.BETWEEN:0.01,99999The amount must be between 0.01 and 99999.
VOUCHERRESERVATION.CREATE.AMOUNT.VALID_CURRENCY_AMOUNTAmount must have exactly two decimals.
VOUCHERRESERVATION.CREATE.CODE.REQUIREDThe code field is required.
VOUCHERRESERVATION.CREATE.CODE.STRINGThe code must be a string.
VOUCHERRESERVATION.CREATE.CODE.VALID_VOUCHER_CODEInvalid voucher code.
VOUCHERRESERVATION.CREATE.CODE.VALID_CLIENT_DESTINATIONThe client is not allowed to use this voucher.
VOUCHERRESERVATION.CREATE.PIN.VALID_VOUCHER_PINInvalid voucher pin.
VOUCHERRESERVATION.CREATE.CURRENCY.REQUIREDThe currency field is required.
VOUCHERRESERVATION.CREATE.CURRENCY.VALID_CURRENCYCurrency must be a valid currency code.

Charge

CodeMessage
VOUCHERRESERVATION.CHARGE.ORDER_NUMBER.REQUIREDThe order_number field is required.
VOUCHERRESERVATION.CHARGE.ORDER_NUMBER.STRINGThe order_number must be a string.

General error codes

These appear at the top level (not in errors) for business logic failures.

VoucherReservation

Create

CodeMessage
VOUCHERRESERVATION.CREATE.INACTIVEThis voucher is inactive.
VOUCHERRESERVATION.CREATE.EXPIREDThis voucher is expired.
VOUCHERRESERVATION.CREATE.NO_CREDITThis voucher has no credit left.

What’s Next?

Vouchers API Quickstart

Set up a client, get credentials, and run the full voucher lifecycle.

Voucher API Reference

Full endpoint reference for all Vouchers API operations and parameters.