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

StatusDescription
ACTIVEThe voucher has been successfully purchased and is available for use.
CANCELLEDThe voucher has been successfully cancelled.
REDEEMEDThe voucher has been successfully redeemed.
REDEMPTION_IN_PROGRESSA redemption of the voucher is being processed.
EXPIREDThe 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-Signature header · string
X-Signature-Key-Id header · string

Request body

pageSize required integer

Number of elements returned in each page

pageNumber required integer

The page number, starting from 0

from string · date

Vouchers created on or after this date, yyyy-MM-dd. Applied only together with to; at most 366 days apart

to string · date

Vouchers created on or before this date, yyyy-MM-dd. Applied only together with from

uuids array of string

Only vouchers with these UUIDs

statuses array of string

Only vouchers in these statuses (case-sensitive)

Allowed values: ACTIVE REDEMPTION_IN_PROGRESS EXPIRED REDEEMED CANCELLED

Responses

200 Page of vouchers
elements array of CashVoucherResponse

Vouchers on this page

Show fields
uuid string

Cash voucher UUID

voucherNumber string

Voucher number. Sensitive data

securityCode string

Security code. Sensitive data

amount number

Voucher amount

currency string

Voucher currency

expiryDate string · date

Expiry date of the voucher, yyyy-MM-dd

status string

Current status of the cash voucher, see Cash voucher status above

Allowed values: ACTIVE REDEMPTION_IN_PROGRESS EXPIRED REDEEMED CANCELLED

voucherType string

Always REGULAR for vouchers bought through the API

Allowed values: REGULAR

size integer · int32

The size of the page (number of records per page)

totalElements integer · int64

Total number of records represented with this pagination

totalPages integer · int32

Total number of pages for representing this pagination

number integer · int32

The current page number (zero-based)

400 The request is malformed or failed validation
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
401 Missing or invalid API credentials, or invalid request signature
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
409 The request conflicts with the merchant setup or the current state of the resource
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
429 Rate limit exceeded
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
500 Unexpected error
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string

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-Signature header · string
X-Signature-Key-Id header · string

Request body

uuid required string

Cash voucher UUID

reason string

Reason for the cancellation

Responses

200 Voucher cancellation result
uuid string

Cash voucher uuid

amount number

Amount

currency string

Currency

status string

Always CANCELLED

Allowed values: CANCELLED

400 The request is malformed or failed validation
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
401 Missing or invalid API credentials, or invalid request signature
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
409 The request conflicts with the merchant setup or the current state of the resource
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
429 Rate limit exceeded
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
500 Unexpected error
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string

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-Signature header · string
X-Signature-Key-Id header · string

Request body

sourceAccountId required integer · int64

The account used for purchasing the voucher

amount required integer

Voucher amount, in the account currency

Allowed values: 5 10 15 20 25 30 50 75 100 150 200 250 500

currency required string

Voucher currency; must equal the source account currency

foreignId string

Your reference for the voucher purchase. Stored as the foreign transaction ID of the purchase transaction

Responses

200 Purchased voucher
uuid string

Cash voucher UUID

voucherNumber string

Voucher number. Sensitive data

securityCode string

Security code. Sensitive data

amount number

Voucher amount

currency string

Voucher currency

expiryDate string · date

Expiry date of the voucher, yyyy-MM-dd

status string

Current status of the cash voucher, see Cash voucher status above

Allowed values: ACTIVE REDEMPTION_IN_PROGRESS EXPIRED REDEEMED CANCELLED

voucherType string

Always REGULAR for vouchers bought through the API

Allowed values: REGULAR

400 The request is malformed or failed validation
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
401 Missing or invalid API credentials, or invalid request signature
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
409 The request conflicts with the merchant setup or the current state of the resource
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
429 Rate limit exceeded
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
500 Unexpected error
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string

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-Signature header · string
X-Signature-Key-Id header · string

Request body

sourceAccountId required integer · int64

The account used for purchasing the vouchers

vouchers required array of CashVoucherApiDTO

Vouchers to buy (at least one). All are bought in one transaction

Show fields
amount required integer

Voucher amount, in the account currency

Allowed values: 5 10 15 20 25 30 50 75 100 150 200 250 500

currency required string

Voucher currency; must equal the source account currency

foreignId string

Your reference for this voucher

Responses

200 Purchased vouchers
uuid string

Cash voucher UUID

voucherNumber string

Voucher number. Sensitive data

securityCode string

Security code. Sensitive data

amount number

Voucher amount

currency string

Voucher currency

expiryDate string · date

Expiry date of the voucher, yyyy-MM-dd

status string

Current status of the cash voucher, see Cash voucher status above

Allowed values: ACTIVE REDEMPTION_IN_PROGRESS EXPIRED REDEEMED CANCELLED

voucherType string

Always REGULAR for vouchers bought through the API

Allowed values: REGULAR

400 The request is malformed or failed validation
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
401 Missing or invalid API credentials, or invalid request signature
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
409 The request conflicts with the merchant setup or the current state of the resource
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
429 Rate limit exceeded
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
500 Unexpected error
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string