curl --request POST \
--url {protocol}://{host}/v2/loyalties/programs/{programId}/rewards/purchases/{rewardTransactionId}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '{
"policies": {}
}'{
"transaction": {
"id": "<string>",
"card_id": "<string>",
"card_transaction_id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"reward_id": "<string>",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {},
"points": {
"total": 123
},
"result": {
"reward": {
"id": "<string>"
},
"quantity": 123,
"material": {
"product": {},
"sku": {}
},
"digital": {
"discount_coupons": [
{
"id": "<string>",
"code": "<string>"
}
],
"gift_vouchers": [
{
"id": "<string>",
"code": "<string>",
"amount": 123,
"balance": 123
}
],
"loyalty_card_points": {
"points": 123,
"card_definition_id": "<string>",
"card_id": "<string>"
}
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"status": "APPROVED",
"message": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}Refund a reward purchase
⚠️ BETA endpoint
This is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may subject to change. If you want to share feedback or improvements, contact Voucherify support or your Technical Account Manager.
Refunds a previously approved reward purchase transaction. Creates a REFUND-type reward transaction and schedules the return of the spent points to the member’s card (“Reward refund transaction created. Points will be returned to the member’s card shortly.”).
The refunded purchase transaction must be of type PURCHASE and in APPROVED status,
otherwise the request is rejected with a conflict error.
The request body is optional (an empty payload is allowed). When omitted, default
policies are applied: refund: DEFAULT, stock: DEFAULT.
A valid request URL is required to generate request examples{
"transaction": {
"id": "<string>",
"card_id": "<string>",
"card_transaction_id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"reward_id": "<string>",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {},
"points": {
"total": 123
},
"result": {
"reward": {
"id": "<string>"
},
"quantity": 123,
"material": {
"product": {},
"sku": {}
},
"digital": {
"discount_coupons": [
{
"id": "<string>",
"code": "<string>"
}
],
"gift_vouchers": [
{
"id": "<string>",
"code": "<string>",
"amount": 123,
"balance": 123
}
],
"loyalty_card_points": {
"points": 123,
"card_definition_id": "<string>",
"card_id": "<string>"
}
}
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"status": "APPROVED",
"message": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique loyalty program identifier (format: lprg_ followed by hexadecimal characters).
Unique reward transaction identifier of the purchase to refund (format: lrtx_ followed by hexadecimal characters).
Body
Optional refund policies. An empty payload is allowed.
Request body for refunding a reward purchase. May be empty; defaults are applied.
Refund policies. When omitted or null, defaults are applied.
Show child attributes
Show child attributes
Response
Refund accepted. The refund reward transaction has been created with status APPROVED and points will be returned to the member's card asynchronously.
Result of a reward refund request.
The created REFUND-type reward transaction.
Show child attributes
Show child attributes
Result status. Always APPROVED on success.
APPROVED Human-readable result message: "Reward refund transaction created. Points will be returned to the member's card shortly.".
Was this page helpful?

