Confirm the session with a payment method token
POST/checkout-sessions/:sessionId/confirmations
ConfirmSession with the PSP payment method token (never a card number). AUTHORIZING calls customer-payments POST /payment-authorizations (key <sessionId>:auth:<attempt>, the attempt counter grows on every retry after a decline; allocations per group); the authorized amount must equal the quote total (ErrAuthorizationMismatch). PLACING persists the placement request and calls customer-ordering POST /checkout with Idempotency-Key equal to the sessionId. Outcomes: 200 with the session in a definitive state (COMPLETED, DECLINED, REQUOTE_REQUIRED with requotedOffers after a successful void, or FAILED after a void plus an alert for a contract bug); 202 while the place-order outcome is unknown (the session stays PLACING; poll GET /checkout-sessions/{sessionId}). A DECLINED session may be confirmed again with another token while the price quote is valid.
Request
Responses
- 200
- 202
- 400
- 404
- 409
- 422
- 500
The session in a definitive state (COMPLETED, DECLINED, REQUOTE_REQUIRED or FAILED).
Response Headers
Set to true on a replay of a stored answer (a retry carrying the same Idempotency-Key, method, path and body), and only on a replay: the first execution of a key never carries it.
An outcome is unknown: the authorization (the session stays AUTHORIZING; ResolveStuckAuthorizations re-calls with the same key after 2 minutes) or the place-order step (the session stays PLACING, the semantic lock). Poll GET /checkout-sessions/{sessionId}.
Response Headers
Set to true on a replay of a stored answer (a retry carrying the same Idempotency-Key, method, path and body), and only on a replay: the first execution of a key never carries it.
malformed-request (bad or empty JSON, unknown field, trailing data, a body over 64 KiB, a NUL character in the query string or body), idempotency-key-required (no Idempotency-Key header) or idempotency-key-invalid (not 1-128 printable ASCII characters). A malformed-request answer is stored under its key and replayed with Idempotency-Replayed: true.
not-found (unknown session) or resource-not-found (a NUL character in the path); an identifier longer than 128 characters is not-found.
session-closed (ErrSessionClosed), authorization-mismatch (ErrAuthorizationMismatch, the authorization is voided), placement-in-doubt (ErrPlacementInDoubt), void-pending (ErrVoidPending, a previous authorization is still being voided), illegal-transition (a confirm while AUTHORIZING), concurrent-update, or idempotency-key-reused (the Idempotency-Key was already used with a different request).
Response Headers
Set to true on a replay of a stored answer (a retry carrying the same Idempotency-Key, method, path and body), and only on a replay: the first execution of a key never carries it.
validation-failed (a missing token) or price-quote-expired (ErrPriceQuoteExpired, contracts-delta S2: open a new session).
Response Headers
Set to true on a replay of a stored answer (a retry carrying the same Idempotency-Key, method, path and body), and only on a replay: the first execution of a key never carries it.
internal-error. The detail is always "an unexpected error occurred"; a 5xx is never stored under the Idempotency-Key.