Authentication
This endpoint supports two authentication methods:
- Bearer token via
POST /v1/checkout/sessions
- HMAC signature via
POST /v1/sdk/checkout/sessions using X-API-Key and X-Signature headers
Authorization: Bearer <your_jwt_token>
or (for server-to-server SDK integration):
X-API-Key: <your_api_key>
X-Signature: <hmac_sha256_signature>
X-Timestamp: <unix_timestamp>
Use the /v1/sdk/checkout/sessions endpoint when integrating from your backend with HMAC authentication. This is the recommended approach for production integrations.
Body Parameters
The payment amount in the specified fiat currency. Must be greater than zero.
The fiat currency for the checkout. Supported values: USD, LKR.
The URL to redirect the customer to after a successful payment. The session ID will be appended as a query parameter.
The URL to redirect the customer to if they cancel the checkout.
An arbitrary key-value object to attach to the session. Returned in webhook events for reconciliation.
Response
Unique identifier for the checkout session.
The full URL of the hosted checkout page. Redirect the customer to this URL to complete payment.
ISO 8601 timestamp indicating when the checkout session expires.
{
"amount": 49.99,
"currency": "USD",
"successUrl": "https://yoursite.com/payment/success",
"cancelUrl": "https://yoursite.com/payment/cancel",
"metadata": {
"orderId": "order_5678",
"customerRef": "cust_001"
}
}
{
"sessionId": "cs_live_abc123def456",
"checkoutUrl": "https://olp-checkout.nipuntheekshana.com/session/cs_live_abc123def456",
"expiresAt": "2026-03-26T16:00:00Z"
}