Skip to main content
Version: v2

Child Sessions

Quick Reference
  • API Endpoint: POST v1/checkout-sessions/{sessionId}/child-sessions
  • Scope: user
  • Applicable Session Modes: PAYMENT_WITH_WALLET, PAYMENT , WALLET
  • Key Fields: childSession, childSessionStatus, parentSession, mode, status
  • Usage: Used for flows like Text to Pay, where a parent session delegates a specialized function to a child session.
  • See Also: Get Checkout Session Details

Handling Child Sessions

  • Use this API to enable delegation scenarios by linking a child session to a parent session.
  • Supported Child Session Modes: TEXT_TO_PAY, EMAIL_TO_PAY, TEXT_TO_ADD, EMAIL_TO_ADD

Create Child Session

Sample Request

Sample Request – Create Child Session
{
"email": "string",
"phone": {
"countryCode": "string",
"number": "string"
},
"childSessionMode": "TEXT_TO_ADD"
}

Sample Response

Child Session Statuses

Child Session Statuses
StatusDescription
NOTIFICATION_CREATEDInitial state after notification sent to customer
NOTIFICATION_SENTAfter notification delivered to customer
LINK_OPENEDCustomer has opened the notification link
COMPLETEDSuccessfully completed its function
FAILEDFailed to complete its function
CANCELEDExplicitly canceled
EXPIREDExceeded its time limit

Sample Use Case: Text to Pay Notification Flow

  1. Parent session creates child session with NOTIFICATION_CREATED mode
  2. System sends notification to customer with link
  3. Status set to NOTIFICATION_SENT
  4. When customer opens link, status updates to LINK_OPENED
  5. When customer completes action, status updates to COMPLETED

Error Handling

When a child session encounters an error:

  1. The error details are stored in the child session
  2. The parent session is notified of the error
  3. Appropriate error responses are generated for API consumers