{
"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"
}
Checkout Sessions
Create Checkout Session
Create a hosted checkout session and receive a redirect URL for the customer
POST
/
v1
/
checkout
/
sessions
{
"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"
}
Authentication
This endpoint supports two authentication methods:- Bearer token via
POST /v1/checkout/sessions - HMAC signature via
POST /v1/sdk/checkout/sessionsusingX-API-KeyandX-Signatureheaders
Authorization: Bearer <your_jwt_token>
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 URL to redirect the customer to after a successful payment. The session ID will be appended as a query parameter.
An arbitrary key-value object to attach to the session. Returned in webhook events for reconciliation.
Response
The full URL of the hosted checkout page. Redirect the customer to this URL to complete payment.
{
"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"
}