Your business logic may include a case when you need to undo a redemption. You can revert a redemption by calling this API endpoint. This endpoint rolls back only single redemptions, meaning those that are not stacked. Stacked redemptions belong to a parent redemption. To roll back a parent redemption, including all of its individual redemptions, use the POST Rollback Stackable Redemptions
🚧 You can roll back a redemption up to 3 months back.
The operation
redemption.redemption_entries) andredeemed_quantity by 1).In case of gift card vouchers, this method returns funds back according to the source redemption. In case of loyalty card vouchers, this method returns points back according to the source redemption.
The access token received from the authorization server in the OAuth 2.0 flow.
The original redemption ID to be rolled back (undone).
"r_0ba186c4824e4881e1"
Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.
Request body schema for POST v1/redemptions/{redemptionId}/rollback.
Returns a redemption rollback object indicating the result of the rollback.
Response body schema for POST v1/redemptions/{redemptionId}/rollback.
Unique identifier of the redemption rollback.
"rr_0efeb3dab05e62e599"
The type of the object represented by the JSON
redemption_rollback Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.
"2021-12-22T10:13:06.487Z"
Unique customer ID of the redeeming customer.
"cust_i8t5Tt6eiKG5K79KQlJ0Vs64"
Hashed customer source ID.
The metadata object stores all custom attributes assigned to the redemption.
Unique redemption ID of the parent redemption.
"r_0c656311b5878a2031"
Redemption result.
SUCCESS, FAILURE Redemption status.
SUCCEEDED, FAILED Order information.
Defines the details of the channel through which the redemption was issued.
Simplified customer data.
Defines the related object.
voucher, promotion_tier, redemption Unique identifier of the related object. It is assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.
For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer.
-10000
System generated cause for the redemption being invalid in the context of the provided parameters.
If the result is FAILURE, this parameter will provide a generic reason as to why the redemption failed.
"customer_rules_violated"
If the result is FAILURE, this parameter will provide a more expanded reason as to why the redemption failed.
Defines the details of the voucher being originally redeemed.
Contains details of the promotion tier and the parent campaign.
Contains the amount returned to the gift card in the redemption rollback. It is expressed as a negative integer.
Contains the number of points returned to the loyalty card in the reward redemption rollback. It is expressed as a negative integer.