Sessions β Processing
Platform engineers implementing or debugging v1 session creation and lifecycle processing.
Processing detail for the Sessions API developer page.
Sessions Processing Flowβ
The session is a central orchestration object. When created, it validates the merchant, customer, and payment details, then generates a transient session token used by the widget to fetch configuration and submit payment.
Session Creation Flow
Processing Steps:
- Request received β CCG validates the incoming session request (merchantId, JWT, required fields)
- Customer resolution β CCG determines wallet vs guest experience based on customer identifiers (
hsid,enterpriseId) - Session created β CCG persists the session with status
ACCEPTEDβCREATED - Token generation β A short-lived
checkoutSessionIdis returned; the merchant passes this to the widget - Widget loads β Widget fetches session state and renders the correct mode/experience
- Action completion β Widget submits the payment or wallet action; session transitions to
COMPLETEDorFAILED
Session Statusesβ
important
Internally, sessions transition through additional states not exposed to merchants. The merchant-facing statuses are derived from these internal states.
| Internal Status | Merchant-Visible Status | Description |
|---|---|---|
PENDING_INITIALIZATION | ACCEPTED | Session record created, not yet validated |
INITIALIZED | CREATED | Session validated and ready for widget |
PAYMENT_PENDING | CREATED | Widget loaded, payment in progress |
PAYMENT_COMPLETED | COMPLETED | Payment processor confirmed success |
PAYMENT_FAILED | FAILED | Processor returned failure |
TIMED_OUT | EXPIRED | Session exceeded TTL without completion |