Adjust Voucher Balance
curl --request POST \
--url https://{cluster}.voucherify.io/v1/vouchers/{code}/balance \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"amount": 10000
}
'{
"amount": 10000,
"total": 20100,
"balance": 20100,
"type": "gift_voucher",
"object": "balance",
"related_object": {
"type": "voucher",
"id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
}
}{
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find voucher with id IrKORhS",
"request_id": "v-0a96cd820301c0483a",
"resource_id": "IrKORhS",
"resource_type": "voucher"
}Adjust Voucher Balance
Add balance to an existing gift card or loyalty card. For loyalty cards (legacy loyalty), the card must be assigned to a holder. For Loyalty hub cards, use /v2/loyalties card transaction endpoints.
POST
/
v1
/
vouchers
/
{code}
/
balance
Adjust Voucher Balance
curl --request POST \
--url https://{cluster}.voucherify.io/v1/vouchers/{code}/balance \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"amount": 10000
}
'{
"amount": 10000,
"total": 20100,
"balance": 20100,
"type": "gift_voucher",
"object": "balance",
"related_object": {
"type": "voucher",
"id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
}
}{
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find voucher with id IrKORhS",
"request_id": "v-0a96cd820301c0483a",
"resource_id": "IrKORhS",
"resource_type": "voucher"
}Authorizations
X-App-Id & X-App-TokenX-Voucherify-OAuth
Scopes
Path Parameters
Body
application/json
Provide the amount to be added to/subtracted from the voucher.
Request body schema for vouchers/{code}/balance.
The incremental amount to be added to or removed from the current balance on the gift card or loyalty card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00. To remove balance, simply add a minus sign before the value, i.e. to remove $20, use -2000.
Response
Returns a balance object if the operation succeeded.
Response body schema for vouchers/{code}/balance.

