Checking access…

Skip to main content
Audience: CCG Platform Engineers

Confirming a Payment Allocation (3DS)

Platform engineers implementing or debugging the 3DS allocation-confirmation step in split-tender payments. For the request/response walkthrough, see How to Confirm a Payment Allocation. For validation order, status tables, and error scenarios, see Confirm Allocation β€” Reference.

Explains the PATCH /v2/payments/{paymentId}/allocations/{allocationId}/confirm endpoint. This is not a merchant-facing integration point β€” the actor model is fixed: the customer-facing checkout application (in practice, the CCG Widget) owns the 3DS challenge and makes the user-scoped confirm call automatically. The merchant backend must not call this endpoint directly or use it as a recovery step, so this page lives in the Engineering Guide rather than Developers.

When a payment allocation requires 3D Secure (3DS) authentication, it enters either the AUTH_REQUIRED or CONFIRMATION_REQUIRED status. The customer must complete the 3DS challenge in their browser or app before the allocation can proceed. Once the challenge is complete, the checkout flow calls the confirm endpoint to continue the payment flow for that specific allocation.

When This Endpoint Is Called​

The customer-facing checkout application calls this endpoint when polling or a webhook indicates that an allocation has transitioned to:

StatusMeaning
AUTH_REQUIRED3DS authentication is required before authorization can proceed
CONFIRMATION_REQUIREDAuthorization is complete but explicit confirmation is needed before capture

The service rejects the request if the allocation is not in a confirmable state. If the customer never completes the 3DS challenge, the allocation simply stays in AUTH_REQUIRED or CONFIRMATION_REQUIRED β€” no automatic timeout is applied; it remains in that status until confirmed or the checkout session expires.

Sibling Failure Check

If another allocation in the same transaction is already in FAILED, PAYMENT_METHOD_FAILED, CANCELED, CANCEL_INITIALIZED, or CANCEL_FAILED, the confirm call will be rejected with 422. The transaction is already heading toward cancellation β€” completing a 3DS challenge would only result in an immediate rollback of the confirmed leg.

Confirm Allocation Processing Flow​

Confirm Allocation Sequence

Processing Steps​

  1. Receive request β€” Customer-facing checkout application sends PATCH with Authorization, paymentId, allocationId, X-Merchant-Id, X-Checkout-Id, and X-Upstream-Env in non-production
  2. Merchant ownership β€” Verify X-Merchant-Id matches the transaction's merchant
  3. Sibling abort check β€” Reject if any sibling allocation is in FAILED, PAYMENT_METHOD_FAILED, CANCELED, CANCEL_INITIALIZED, or CANCEL_FAILED; the transaction is already heading toward cancellation
  4. Allocation membership β€” Verify allocationId belongs to this transaction
  5. Checkout ID match β€” Compare X-Checkout-Id against the checkoutId stored in the allocation's metadata
  6. Status check β€” Verify the allocation is in AUTH_REQUIRED or CONFIRMATION_REQUIRED
  7. Checkout session validation β€” Auth service confirms the session is active and non-agent
  8. Transition β€” Allocation moves to CONFIRMATION_INITIALIZED; event published (dataVersion: "0.1")
  9. Stripe processing β€” Stripe adapter processes the PaymentIntent; allocation eventually transitions to AUTHORIZED or COMPLETED

Processor-Specifics​

  • V1 delegation: The endpoint delegates to V1 ConfirmPaymentCommandHandler. Stripe-facing logic is unchanged β€” one PaymentIntent per allocation.
  • Event version: Published event carries dataVersion: "0.1" β€” the existing stripe adapter PaymentConsumer handles it; no new consumer is required.
  • Advisory lock: An advisory lock is acquired per allocation to prevent concurrent confirm calls β€” both allocations in a split-tender payment can be confirmed at the same time, each with its own PATCH call, without racing each other.
  • Agent sessions: Checkout session validation rejects agent-initiated sessions β€” agents cannot complete 3DS challenges.
Capture Gating

When any allocation is in AUTH_REQUIRED, the orchestrator pauses the capture pipeline for the entire transaction. No allocation will be captured until all pending 3DS challenges are resolved. This prevents partial captures across a split-tender transaction.