Retrieve a session

Read a payment session's amount, customer and return URL before you charge.

GET{BASE_URL}/payments/sessions/{id}

Returns the checkout view of a session. Call it from your server when your checkout page receives a session_id, and charge the amountMinor it returns — never an amount from the browser. Requires the PAYMENT scope.

If the session is still PENDING or PROCESSING but its lifetime has passed, this call marks it EXPIRED and returns it that way.

Path parameters

idstringrequired
The session ID.

Response

dataobjectrequired
The session's checkout view.

Status codes#

StatusCodeMeaning
200—Success.
404payment_session_not_foundNo session of yours has that ID in this key's environment.
curl "$LOCALOY_BASE_URL/payments/sessions/cm5s3ss10n00000000000001" \
  -H "Authorization: Bearer $LOCALOY_API_KEY"
Response · 200
{
  "success": true,
  "data": {
    "id": "cm5s3ss10n00000000000001",
    "status": "PENDING",
    "environment": "PRODUCTION",
    "amountMinor": 90000,
    "currency": "BDT",
    "description": "Kayak (1 hour) × 2",
    "subject": {
      "type": "ACTIVITY_BOOKING",
      "id": "cm5b00k1ng0000000000001",
      "experienceId": "cm5act1v1ty000000000001"
    },
    "customer": { "name": "Nusrat Jahan", "phone": "01712345678", "email": null },
    "returnUrl": "https://partner.localoy.app/payments/return?session_id=…&token=…",
    "expiresAt": "2026-09-26T09:00:00.000Z",
    "isExpired": false,
    "isTest": false,
    "providerReference": null,
    "settledAt": null,
    "createdAt": "2026-09-26T08:30:00.000Z"
  }
}