Skip to content

Create a payment session

Request

Creates a payment session — a configurable workflow that wraps a payment journey with pre-steps and/or post-steps such as identity verification, compliance checks, or data collection. The exact step sequence is determined by the session_type configured for your business.

Example: The kyc_lrs session type adds a KYC verification step before the LRS remittance checkout, ensuring the customer is verified before funds are transferred.

Next step: launch the SDK. Creating a session does not start the customer journey on its own. After this call, pass the returned id and token to the Unified SDK (Web) as paymentSessionId and paymentSessionToken to open the guided UI for the customer. The SDK guide's "Journey 1: Payment Session" section has the integration steps.

Optionally associate the session with an existing customer via customer_id, or pre-populate customer details using email. Both fields are optional and mutually exclusive — passing both returns a 400 error. Omitting both creates an anonymous session.

Prefilling steps: Pass prefill data to pre-populate steps in the flow so the customer skips re-entering known values. Include only the data relevant to your session_type.

  • KYC prefill — identity details (pan, phone, country, dob) used to prefill the KYC step. Two request shapes are supported: v1 places the kyc object at the top level; v2 nests it under data.kyc (recommended, and the shape used alongside other data groups). Provide only one shape — supplying kyc at both the top level and under data returns a 400 error. When any of pan, phone, or dob is supplied, pair it with email; these fields cannot be combined with customer_id (which is authoritative), and supplying them without any identifier returns a 400 error. When phone is supplied, country (ISO 3166-1 alpha-3) is required and is used to validate the phone number format.

  • Scheme prefill (data.scheme) — investment scheme details (plan, amount, currency, distributor_arn, ria_code, sub_distributor_code) used to prefill the scheme plan and amount step. amount and currency must be supplied together.

Sessions for a named scheme: pass data.scheme.scheme_code to open the session for one scheme. A distributor must send it; see Open payment sessions as a distributor. A fund can name one of its own schemes.

Contact support if you receive a 403 error — payment sessions must be enabled for your business.

Security
JWT
Bodyapplication/json
customer_idstring

The unique identifier of an existing customer (cust_ prefix). Mutually exclusive with email.

Example:"cust_abc123XYZ"
emailstring, (email)

Email address to pre-populate customer details in the session flow. Mutually exclusive with customer_id.

Example:"john.doe@example.com"
kycobject

KYC prefill (v1) — identity details used to prefill the KYC step. Equivalent to data.kyc (v2, recommended); provide one shape or the other, not both. Only accepted when customer_id or email is also provided at the top level.

dataobject

Optional container for prefill data. Include only the groups relevant to your session_type; unknown groups are ignored. When present it must be a JSON object; an array, string, number or boolean returns a 400 error.

curl -i -X POST \
  https://api.glomopay.com/api/v1/payment-sessions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{}'

Responses

Payment session created successfully.

Bodyapplication/json
idstring

Unique identifier for the payment session, prefixed with psess_.

Example:"psess_6819d8046mpKt"
statusstring

Current status of the payment session.

  • active — the customer can go through the session.
  • completed — the customer finished every step. Terminal.
  • failed — the session ended without finishing. Terminal.
  • expired — the session passed expires_at before it finished. Terminal.
Enum:"active""completed""failed""expired"
Example:"active"
session_typestring

The workflow type configured for this session, which determines the pre-steps and/or post-steps in the payment journey. The value is configured per business by Glomo; you do not choose it per request.

  • kyc_lrs — KYC, then an LRS remittance checkout.
  • kyc_lrs_folio — mutual fund investment from India under LRS: folio and scheme selection, KYC, then an LRS remittance checkout.
  • kyc_nri_individual_verification — onboarding of an individual NRI investor, ending when KYC (including video KYC) completes.
  • kyc_nri_joint_verification — NRI investor verification that collects folio and scheme selection before KYC.
  • kyc_inbound_folio — mutual fund investment by an NRI investor: folio and scheme selection, NRI KYC, folio creation, then an inbound checkout.
Enum:"kyc_lrs""kyc_lrs_folio""kyc_nri_individual_verification""kyc_nri_joint_verification""kyc_inbound_folio"
Example:"kyc_lrs"
tokenstring

Short-lived JWT token. Pass it, together with the session id, to the Unified SDK (Web) as paymentSessionToken to launch the session UI for the customer.

Example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
expires_atstring, (date-time)

ISO 8601 timestamp when the session expires.

Example:"2026-05-07T10:30:00Z"
Response
{ "id": "psess_6819d8046mpKt", "status": "active", "session_type": "kyc_lrs", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "expires_at": "2026-05-07T10:30:00Z" }