Skip to content

Open payment sessions as a distributor

This guide opens a session for one of a fund's schemes and hands it to the investor. Read Distributor first for what the relationship fixes.

Before you start

  • Distributor access is enabled for your business.
  • You have an active relationship with the fund.
  • The fund has given you the scheme codes you may sell.
  • You have your API key. See Get started.

1. Create the session on your server

Send the scheme code in data.scheme.scheme_code. Matching ignores case and surrounding spaces.

curl -X POST 'https://api.glomopay.com/api/v1/payment-sessions' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "john.doe@example.com",
    "data": {
      "scheme": {
        "scheme_code": "SCH001",
        "amount": 500000,
        "currency": "USD"
      },
      "kyc": {
        "pan": "ABCPE1234F"
      }
    }
  }'
Field Required Notes
data.scheme.scheme_codeYesA scheme the fund has enabled for you.
emailNoPrefills the investor's email. Required if you send pan, phone or dob.
data.scheme.amount, data.scheme.currencyNoPrefills the amount, in cents of USD. Send both or neither. Send whole dollars (a multiple of 100).
data.kycNoPrefills pan, phone, country and dob for KYC.

Do not send customer_id; it returns 422. distributor_arn is ignored.

The response:

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

session_type is the fund's, not yours. Keep token on your server until you hand it to the investor's checkout. Do not log it or send it anywhere else.

2. Launch the session for the investor

Pass id and token to the Unified SDK as paymentSessionId and paymentSessionToken. See Unified SDK → Payment Session. To open it inside a mobile app, see Web Checkout in a Mobile App.

The investor then completes the fund's journey. Your ARN is shown on the checkout and cannot be changed.

3. Track the session

You see every session credited to you, the same way the fund sees it:

  • Webhook. Register a webhook endpoint to receive the payment_session webhook each time the session changes status, from created to completed. The fund gets the same event.
  • One session. Call Retrieve a payment session with the session id for its current state.
  • All your sessions. Call List payment sessions for the sessions credited to you across every fund, newest first. Filter by scheme_code, or by status (completed or failed).

A session credited to another distributor returns 404.

Errors

Status Message What to do
400scheme_code is requiredSend data.scheme.scheme_code.
403Payment session is not enabled for this businessThe fund does not have payment sessions enabled. Contact Glomo support.
403No active relationship with this fundYour relationship with the fund is disabled. Contact the fund.
403Scheme not enabled for this relationshipThe fund has not enabled this scheme for you. Contact the fund.
404Scheme not foundThe code matches no active scheme, or no fund you have a relationship with. Check the code.
409PAN is already registered with a different emailThe PAN is registered under another email. Use that email.
422Scheme is not available for distributionThe scheme is a direct plan. Use the fund's regular-plan scheme.
422Fund is not configured for scheme sessionsThe fund's journey has no scheme step. Contact Glomo support.
422Distributor ARN is not configured for this fundYour ARN is missing on the relationship. Contact Glomo support.
422customer_id is not supported for relationship-originated sessionsRemove customer_id. Send email instead.

For the full request schema, see Create a payment session.