Split-Tender Payment Flow
Platform engineers building or debugging the two-card atomic payment path, including rollback and 3DS-sibling-failure handling. For the request/response walkthrough, see How to Make a Split-Tender Payment. For internal status tables and webhook payloads, see Split-Tender Payment β Reference. If a 3DS challenge is stuck or failing on one leg, check Split Tender β 3DS / Authentication Failures as well.
Overviewβ
A split-tender payment distributes a single transaction across exactly 2 payment allocations (currently CARD + CARD only). The system treats the two allocations as an atomic unit β if one fails, the successful allocation is automatically rolled back.
Key characteristics:
- Exactly 2 entries in
paymentAllocations - Only
CARD+CARDcombinations supported - Only
SALEtransactions (not pre-auth) - Automatic rollback (cancel/reverse) if any allocation fails
ROLLED_BACKstatus andremediationobject on reversed allocations
Sequence Diagramβ
Rollback Logicβ
If rollback (cancel of allocation[0]) fails, the allocation enters CANCEL_FAILED state. This requires manual intervention β see Incident Playbooks (coming soon).
Retry & Rollback Flowβ
When a split-tender payment fails, CCG automatically rolls back the successful card. The merchant can then retry with the same merchantTransactionId.
Retry & Rollback Flow
Comparison: Single vs Split-Tenderβ
| Aspect | Single Allocation | Split-Tender |
|---|---|---|
| Cards | 1 | 2 |
paymentAllocations | 1 entry | Exactly 2 entries |
| Rollback | N/A | Automatic (cancel successful if sibling fails) |
ROLLED_BACK status | Never | Yes, on the cancelled allocation |
remediation object | Never present | Present on rolled-back allocation |
| Retry scope | Retry the single card | All-or-nothing β both retried together |
| Pre-auth support | Yes | No (authorizeCard must be false) |
3DS Authentication in Split-Tenderβ
When a CARD allocation requires 3DS authentication, the leg enters AUTH_REQUIRED status and the consumer (session service / HCP) is expected to surface the Stripe client_secret for the challenge. The sibling allocation may still be in-flight at this point.
Sibling failure while AUTH_REQUIREDβ
If the sibling allocation fails (PAYMENT_METHOD_FAILED, FAILED, CANCELED, or a cancel variant) while another leg is waiting in AUTH_REQUIRED, the orchestrator dispatches an automatic cancel to the AUTH_REQUIRED leg via CancelPaymentCommand.
| Step | What happens |
|---|---|
Sibling β PAYMENT_METHOD_FAILED | TransactionAttemptOrchestrator.handlePaymentUpdated() fires |
NextPaymentCommandResolver | Resolves AUTH_REQUIRED leg β CANCEL_PAYMENT_COMMAND; sets authRequiredSiblingPresent=true in context |
CancelPaymentCommand.execute() | AUTH_REQUIRED β CANCELLABLE_STATUSES β proceeds to CancelPaymentCommandHandler |
CancelPaymentCommandHandler | Sets status β CANCEL_INITIALIZED; publishes cancel event to Stripe via Event Grid |
| Stripe adapter | Voids the Payment Intent (requires_action state, no captured funds) |
TransactionAttemptOrchestrator | Derives parent attempt/transaction status β FAILED/ROLLED_BACK |
TransactionService | Publishes terminal webhook event to downstream consumers (HCP/Auth Service) |
Prior to CC-23416, CancelPaymentCommand.CANCELLABLE_STATUSES only contained {AUTHORIZED, ACCEPTED}. The orchestrator would dispatch CANCEL_PAYMENT_COMMAND to the AUTH_REQUIRED leg, but the command silently returned a no-op error result β the allocation was never cancelled, no terminal event was published, and HCP kept showing AUTH_REQUIRED on both legs indefinitely. The fix adds AUTH_REQUIRED to the allowed set.
Context flag: authRequiredSiblingPresentβ
NextPaymentCommandResolver.buildCancelCommandContext() sets authRequiredSiblingPresent=true in the pipeline context whenever any allocation is AUTH_REQUIRED during a cancel scenario. This flag is available to downstream command consumers that may need to distinguish a cancel-of-unconfirmed-challenge from a cancel-of-authorized-payment (e.g. for messaging or audit purposes).