Check the complete list of parameters and responses of the
POST Reverse coupon endpoint to reverse a coupon
redemptionWhat is coupon reversal?
Coupon reversal allows you to undo a coupon redemption and return the rewards back to the system. This is useful when:- A customer needs to cancel an order that used a coupon
- A coupon was redeemed by mistake
- You need to correct an erroneous redemption
- Removes the rewards from the customer’s wallet
- Creates reversal transactions for audit purposes
- Updates the coupon redemption status to
REVERSED - Creates a
REVERSED_COUPONevent - Recalculates the customer’s tier if necessary
Response
The response returns the updated wallet after reversing the coupon, with the rewards removed fromwallet.totals.
The redemptions array contains the lines that were reversed (negative amounts).
What happens when you try to reverse a coupon that was already reversed?
If you attempt to reverse a coupon that has already been reversed, the system will return an error:What happens when the rewards have already been spent?
If the customer has already used (spent or redeemed) the rewards obtained from the coupon, the reversal will fail with an error:What happens when the rewards are currently reserved?
If the rewards from the coupon are currently reserved for a pending order or transaction, the reversal will fail with an error:- A customer has an unfulfilled order that is using the rewards
- The rewards are in a reservation state waiting for order confirmation
- A pending transaction is holding the rewards
- Cancel or complete the pending transaction using the reserved rewards
- Wait for the reservation to expire (if applicable)
- Then attempt the coupon reversal again
What happens when the coupon redemption is not found?
If the coupon redemption does not exist for the specified customer and code, the system will return:Important considerations
- ⚠️ Only active redemptions can be reversed: You cannot reverse a coupon that has already been reversed
- ⚠️ Rewards must not be spent: The customer must have the full amount of rewards in their wallet
- ⚠️ Rewards must not be reserved: If rewards are being held for a pending transaction, they cannot be reversed
- ⚠️ Time-sensitive operation: It’s recommended to reverse coupons as soon as possible after redemption
- ⚠️ Audit trail: All reversals create
REVERSALtransactions and aREVERSED_COUPONevent for tracking - ⚠️ Check order status first: Before reversing a coupon, ensure no pending orders are using the rewards
Use cases
1. Order CancellationReversal workflow
Events created
When a coupon is reversed, aREVERSED_COUPON event is automatically created with the following data:
- Analytics and reporting
- Integration with external systems
- Triggering marketing automation workflows
- Audit and compliance purposes