Rollback Strategies
Overviewβ
This document outlines the comprehensive rollback strategy for the Convenient Checkout Gateway (CCG) when handling split tender payments. The rollback strategy ensures transaction integrity and consistent final states when one payment in a split tender transaction fails or requires cancellation.
- Transaction Integrity: Ensuring that a split tender transaction either completes fully or fails completely
- Rollback: The process of reversing a successful payment when its counterpart in a split tender transaction fails
- Recovery Mechanisms: Processes to handle cases where the rollback itself encounters issues
Core Principlesβ
CCG's split tender rollback strategy follows these core principles:
- Atomic Transactions: Split tender payments are treated as a single atomic unit - they must either succeed completely or fail completely
- Automated Handling: The system automatically initiates rollbacks without merchant intervention
- Timely Resolution: Rollbacks are initiated immediately upon detection of a failure
- Clear Status Communication: Transaction status clearly reflects partial or complete failures
- Financial Protection: Customer funds are protected through appropriate cancellation or refund mechanisms
Rollback Scenariosβ
Card + Cardβ
Card + Card Rollback Use Cases
| Failed Payment | Successful Payment | Rollback Action | Final Transaction Status | Webhooks |
|---|---|---|---|---|
| Card 1 | Card 2 (Authorized) | Cancel authorization on Card 2 | β FAILED | PAYMENT_FAILED |
| Card 2 | Card 1 (Captured) | Issue refund for Card 1 | β FAILED | PAYMENT_FAILED, PAYMENT_REFUNDED |
Notes:
- CCG ensures that if one card payment fails, the other is either cancelled (if authorized) or refunded (if captured), maintaining transaction integrity.
- Merchants receive clear webhook notifications for each action.
Card + ACHβ
Card + ACH Rollback Use Cases
| Failed Payment | Successful Payment | Rollback Action | Final Transaction Status | Webhooks |
|---|---|---|---|---|
| Card | ACH (Accepted) | Cancel ACH transaction | β FAILED | PAYMENT_FAILED |
| Card | ACH (Completed) | Issue refund for ACH payment | β FAILED | PAYMENT_FAILED, PAYMENT_REFUNDED |
| ACH | Card (Authorized) | Cancel Card authorization | β FAILED | PAYMENT_FAILED |
| ACH | Card (Captured) | Issue refund for Card payment | β FAILED | PAYMENT_FAILED, PAYMENT_REFUNDED |
Notes:
- ACH cancellations are only possible if the payment is still in an accepted state; otherwise, a refund is issued.
- Card authorizations are cancelled if ACH fails before card capture.
- All actions are automated and merchants are notified via webhooks.
ACH + ACHβ
ACH + ACH Rollback Use Cases
| Failed Payment | Successful Payment | Rollback Action | Final Transaction Status | Webhooks |
|---|---|---|---|---|
| ACH 1 | ACH 2 (Accepted) | Cancel ACH 2 transaction | β FAILED | PAYMENT_FAILED |
| ACH 1 | ACH 2 (Completed) | Issue refund for ACH 2 payment | β FAILED | PAYMENT_FAILED, PAYMENT_REFUNDED |
Notes:
- CCG attempts to cancel the second ACH if possible; otherwise, a refund is issued.
- All actions are logged and communicated to merchants.
Rollback Processβ
When a payment method fails in a split tender transaction, CCG automatically rolls back any successful payments to ensure atomicity and customer protection. The process includes both refunds and cancellations, depending on the payment status and method.
Refundsβ
Refunds Process
If a payment is already completed, CCG initiates a refund. Merchants receive a detailed PAYMENT_REFUNDED webhook with:
- Child Payment Id: The refunded payment
- Parent Transaction Id: The split tender transaction
- Refund Reason:
CCG ROLLBACK - Amount: Full refund amount
- Status: Refund process status
- Merchants must handle
PAYMENT_REFUNDEDwebhooks with reasonCCG ROLLBACKto keep transaction states accurate. - No
PAYMENT_CANCELLEDevent is sent for cancellations initiated by CCG as part of rollback.
If a refund is processed as a reversal:
PAYMENT_REVERSEDnotification will be sent. See Refunds and Reversals for details.- Reversals are only possible for card transactions.
Cancellationβ
Cancel Process
If a payment is still in an accepted or authorized state, CCG initiates a cancellation. The cancellation includes:
- Child Payment Id: The cancelled payment
- Parent Transaction Id: The split tender transaction
- Cancellation Reason:
CCG_AUTOMATED_CANCEL - Cancellation Message: Split Tender Transaction Failure
- Status: Cancellation process status
- Merchant will receive
PAYMENT_CANCELLEDevent as part of attempt initiated - No separate
PAYMENT_CANCELLEDevent is sent for cancellations initiated by CCG as part of rollback.
Refunds and Reversalβ
Refunds and Reversals
Key Conceptsβ
- According to Stripe documentation:
- Refunds can be processed as reversals if issued shortly after the original charge.
- Impact: Reversals typically incur lower network fees than standard refunds.
Payment Reversalβ
What is Payment Reversal?
As per Stripe, In the case of a reversal, customer won't see a refund credit on their statement β customer will just see the original authorisation drop off their statement entirely after a few days. There will be no payment, and no refund. It'll appear as if the whole transaction never happened. Their bank should be able to confirm this for them. Depending on customer's card issuer, the original charge should have disappeared from their pending charges by T+7 Days
Stripe Response on Reversal Windowsβ
- Question: Is there a specific time window during which a refund is processed as a reversal?
- Stripe Support Response: Slack Thread
Stripe Response on Payment Reversal Window
- The window is shortβessentially until money has actually moved.
- Reversals may be possible for up to a few hours after capture.
- For uncaptured or expired authorizations, different rules apply.
- These appear as refunds in your system but cost less due to reduced interchange fees.
- The main difference is financial: some fees are not charged for reversals.
- Merchants can determine which transactions were processed as reversals vs. refunds by examining transaction details.
Production Data Analysis - Reversal Processing Timelineβ
Case Study: Successful Reversal (64 seconds after capture)
| Event | Timestamp | Elapsed Time |
|---|---|---|
| Payment Initiated | 21/07/2025, 19:35:47 | T+0 |
payment_intent.created | 21/07/2025, 19:35:48 | T+1s |
payment_intent.amount_capturable_updated | 21/07/2025, 19:35:49 | T+2s |
| Capture Initiated | 22/07/2025, 19:04:22 | T+23h 28m 35s |
payment_intent.succeeded | 22/07/2025, 19:04:22 | T+23h 28m 35s |
| Refund Request Initiated | 22/07/2025, 19:05:26 | T+23h 29m 39s |
refund.created | 22/07/2025, 19:05:27 | T+23h 29m 40s |
charge.refunded | 22/07/2025, 19:05:27 | T+23h 29m 40s |
refund.updated | 22/07/2025, 19:05:28 | T+23h 29m 41s |
Key Metrics:
- Time between capture and refund: 64 seconds
- Refund processing time: 2 seconds
- Processed as: Reversal (confirmed via Stripe Dashboard)
- Fee impact: No Fee Charged
Best Practices & Merchant Guidanceβ
- Always use CCG APIs for split tender operations; avoid direct Stripe dashboard actions to prevent indeterminate states.
- Monitor webhook events (
PAYMENT_FAILED,PAYMENT_REFUNDED,PAYMENT_REVERSED) for accurate transaction state tracking. - Implement logic to distinguish between merchant-initiated and CCG-initiated rollbacks using the
Refund ReasonorCancellation Reasonfields. - Communicate clearly with customers about the status of split tender payments, especially in the event of rollbacks or reversals.
- For ACH payments, inform customers that refunds may take 1β3 business days to appear, while card reversals may result in the charge simply disappearing from their statement.