Cash Vouchers
The following section refers to APIs related to Cash Vouchers.
This documentation serves as your comprehensive guide to integrating and utilizing our API endpoints for managing prepaid cash vouchers.
Below, you'll find detailed descriptions of each endpoint, including their functionalities and usage instructions, ensuring a smooth and efficient integration process.
N.B Please note that the Cash voucher feature must be enabled on your Merchant account.
Cash voucher status
| Status | Description |
|---|---|
| ACTIVE | The voucher has been successfully purchased and is available for use. |
| CANCELLED | The voucher has been successfully cancelled. |
| REDEEMED | The voucher has been successfully redeemed. |
| REDEMPTION_ | A redemption of the voucher is being processed. |
| EXPIRED | The voucher has passed its expiry date without being redeemed. |
Search cash vouchers
POST /v1/vouchers/search/paginated
Get a list of your cash vouchers with the specified statuses or UUIDs.
Requires the X-Api-Key and X-Api-Secret headers.
Parameters
X-Signatureheader · stringX-Signature-Key-Idheader · string
Request body
pageSizerequired integerNumber of elements returned in each page
pageNumberrequired integerThe page number, starting from 0
fromstring · dateVouchers created on or after this date,
yyyy-MM-dd. Applied only together withto; at most 366 days aparttostring · dateVouchers created on or before this date,
yyyy-MM-dd. Applied only together withfromuuidsarray of stringOnly vouchers with these UUIDs
statusesarray of stringOnly vouchers in these statuses (case-sensitive)
Allowed values:
ACTIVEREDEMPTION_IN_PROGRESSEXPIREDREDEEMEDCANCELLED
Responses
200 Page of vouchers
elementsarray of CashVoucherResponseVouchers on this page
Show fields
uuidstringCash voucher UUID
voucherNumberstringVoucher number. Sensitive data
securityCodestringSecurity code. Sensitive data
amountnumberVoucher amount
currencystringVoucher currency
expiryDatestring · dateExpiry date of the voucher,
yyyy-MM-ddstatusstringCurrent status of the cash voucher, see Cash voucher status above
Allowed values:
ACTIVEREDEMPTION_IN_PROGRESSEXPIREDREDEEMEDCANCELLEDvoucherTypestringAlways
REGULARfor vouchers bought through the APIAllowed values:
REGULAR
sizeinteger · int32The size of the page (number of records per page)
totalElementsinteger · int64Total number of records represented with this pagination
totalPagesinteger · int32Total number of pages for representing this pagination
numberinteger · int32The current page number (zero-based)
400 The request is malformed or failed validation
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
401 Missing or invalid API credentials, or invalid request signature
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
409 The request conflicts with the merchant setup or the current state of the resource
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
429 Rate limit exceeded
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
500 Unexpected error
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
Cancel voucher
POST /v1/vouchers/cancel
This endpoint allows you to cancel a prepaid voucher. Only ACTIVE vouchers can be cancelled; the amount is returned to the source account.
Requires the X-Api-Key and X-Api-Secret headers.
Parameters
X-Signatureheader · stringX-Signature-Key-Idheader · string
Request body
uuidrequired stringCash voucher UUID
reasonstringReason for the cancellation
Responses
200 Voucher cancellation result
uuidstringCash voucher uuid
amountnumberAmount
currencystringCurrency
statusstringAlways
CANCELLEDAllowed values:
CANCELLED
400 The request is malformed or failed validation
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
401 Missing or invalid API credentials, or invalid request signature
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
409 The request conflicts with the merchant setup or the current state of the resource
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
429 Rate limit exceeded
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
500 Unexpected error
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
Buy voucher
POST /v1/vouchers/buy
This endpoint allows you to purchase a single prepaid voucher.
Requires the X-Api-Key and X-Api-Secret headers.
Parameters
X-Signatureheader · stringX-Signature-Key-Idheader · string
Request body
sourceAccountIdrequired integer · int64The account used for purchasing the voucher
amountrequired integerVoucher amount, in the account currency
Allowed values:
510152025305075100150200250500currencyrequired stringVoucher currency; must equal the source account currency
foreignIdstringYour reference for the voucher purchase. Stored as the foreign transaction ID of the purchase transaction
Responses
200 Purchased voucher
uuidstringCash voucher UUID
voucherNumberstringVoucher number. Sensitive data
securityCodestringSecurity code. Sensitive data
amountnumberVoucher amount
currencystringVoucher currency
expiryDatestring · dateExpiry date of the voucher,
yyyy-MM-ddstatusstringCurrent status of the cash voucher, see Cash voucher status above
Allowed values:
ACTIVEREDEMPTION_IN_PROGRESSEXPIREDREDEEMEDCANCELLEDvoucherTypestringAlways
REGULARfor vouchers bought through the APIAllowed values:
REGULAR
400 The request is malformed or failed validation
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
401 Missing or invalid API credentials, or invalid request signature
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
409 The request conflicts with the merchant setup or the current state of the resource
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
429 Rate limit exceeded
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
500 Unexpected error
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
Buy bulk voucher
POST /v1/vouchers/buy/bulk
This endpoint allows you to purchase multiple prepaid vouchers.
N.B Please be aware that if the account lacks sufficient funds, the entire operation will fail and no vouchers will be purchased.
Requires the X-Api-Key and X-Api-Secret headers.
Parameters
X-Signatureheader · stringX-Signature-Key-Idheader · string
Request body
sourceAccountIdrequired integer · int64The account used for purchasing the vouchers
vouchersrequired array of CashVoucherApiDTOVouchers to buy (at least one). All are bought in one transaction
Show fields
amountrequired integerVoucher amount, in the account currency
Allowed values:
510152025305075100150200250500currencyrequired stringVoucher currency; must equal the source account currency
foreignIdstringYour reference for this voucher
Responses
200 Purchased vouchers
uuidstringCash voucher UUID
voucherNumberstringVoucher number. Sensitive data
securityCodestringSecurity code. Sensitive data
amountnumberVoucher amount
currencystringVoucher currency
expiryDatestring · dateExpiry date of the voucher,
yyyy-MM-ddstatusstringCurrent status of the cash voucher, see Cash voucher status above
Allowed values:
ACTIVEREDEMPTION_IN_PROGRESSEXPIREDREDEEMEDCANCELLEDvoucherTypestringAlways
REGULARfor vouchers bought through the APIAllowed values:
REGULAR
400 The request is malformed or failed validation
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
401 Missing or invalid API credentials, or invalid request signature
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
409 The request conflicts with the merchant setup or the current state of the resource
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
429 Rate limit exceeded
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
500 Unexpected error
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring