Checking access…

Skip to main content
Audience: CCG Platform Engineers

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:

  1. Request received β€” CCG validates the incoming session request (merchantId, JWT, required fields)
  2. Customer resolution β€” CCG determines wallet vs guest experience based on customer identifiers (hsid, enterpriseId)
  3. Session created β€” CCG persists the session with status ACCEPTED β†’ CREATED
  4. Token generation β€” A short-lived checkoutSessionId is returned; the merchant passes this to the widget
  5. Widget loads β€” Widget fetches session state and renders the correct mode/experience
  6. Action completion β€” Widget submits the payment or wallet action; session transitions to COMPLETED or FAILED

Session Statuses​

important

Internally, sessions transition through additional states not exposed to merchants. The merchant-facing statuses are derived from these internal states.

Internal StatusMerchant-Visible StatusDescription
PENDING_INITIALIZATIONACCEPTEDSession record created, not yet validated
INITIALIZEDCREATEDSession validated and ready for widget
PAYMENT_PENDINGCREATEDWidget loaded, payment in progress
PAYMENT_COMPLETEDCOMPLETEDPayment processor confirmed success
PAYMENT_FAILEDFAILEDProcessor returned failure
TIMED_OUTEXPIREDSession exceeded TTL without completion