Skip to main content
Version: Next

Redeem

POST /client/Next/redeem

Redeems a voucher to the account connected to the api key.

Request body

Field nameTypeRequiredDefaultDescription
codeStringYes-Redeem code of a Rewarble voucher

Parameters:

ParameterTypeRequiredDefaultDescription
testBooleanNofalseEnables test mode. For more information see Test Mode

Example Request

curl -X POST api.rewarble.com/client/Next/redeem \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
-d '
{
"code":"ABC123ABC123"
}'

Example Response

{
"faceValue": 10.00,
"faceValueCurrency": "eur",
"voucherSerial": "12345678901234567892",
"transactionWTRX": "WTRX-9Q110AX81RG3JIMAR22AUDVNSD8ZWH",
"state": "test"
}

Response Fields

Field nameField typeField description
faceValueDecimalAmount of voucher
faceValueCurrencyCurrencyCurrency of voucher
voucherSerialStringSerial of voucher
transactionWTRXStringUnique transaction identifier
stateStringState of the request. Either production or test

Errors

Http status codeHttps statusMessageReason
400BAD_REQUESTVOUCHER_INVALID_LENGHTVoucher length is not correct
422UNPROCESSABLE_ENTITYVOUCHER_EXPIREDVoucher has expired
404NOT_FOUNDUNKNOWN_VOUCHERVoucher cannot be found
422UNPROCESSABLE_ENTITYVOUCHER_USEDVoucher has already been used
422UNPROCESSABLE_ENTITYVOUCHER_INACTIVEVoucher is inactive
422UNPROCESSABLE_ENTITYVOUCHER_EMPTYVoucher has no money on it
500INTERNAL_SERVER_ERRORREDEEM_FAILEDUnknown error

Notes

note
  • transactionWTRX can vary in length