Checking access…

Skip to main content
Audience: CCG Platform Engineers

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 + CARD combinations supported
  • Only SALE transactions (not pre-auth)
  • Automatic rollback (cancel/reverse) if any allocation fails
  • ROLLED_BACK status and remediation object on reversed allocations

Sequence Diagram​

Rollback Logic​

Operational Risk

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​

AspectSingle AllocationSplit-Tender
Cards12
paymentAllocations1 entryExactly 2 entries
RollbackN/AAutomatic (cancel successful if sibling fails)
ROLLED_BACK statusNeverYes, on the cancelled allocation
remediation objectNever presentPresent on rolled-back allocation
Retry scopeRetry the single cardAll-or-nothing β€” both retried together
Pre-auth supportYesNo (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.

StepWhat happens
Sibling β†’ PAYMENT_METHOD_FAILEDTransactionAttemptOrchestrator.handlePaymentUpdated() fires
NextPaymentCommandResolverResolves AUTH_REQUIRED leg β†’ CANCEL_PAYMENT_COMMAND; sets authRequiredSiblingPresent=true in context
CancelPaymentCommand.execute()AUTH_REQUIRED ∈ CANCELLABLE_STATUSES β†’ proceeds to CancelPaymentCommandHandler
CancelPaymentCommandHandlerSets status β†’ CANCEL_INITIALIZED; publishes cancel event to Stripe via Event Grid
Stripe adapterVoids the Payment Intent (requires_action state, no captured funds)
TransactionAttemptOrchestratorDerives parent attempt/transaction status β†’ FAILED/ROLLED_BACK
TransactionServicePublishes terminal webhook event to downstream consumers (HCP/Auth Service)
History β€” CC-23416

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).