Authentication
This endpoint requires a Bearer token in the Authorization header.
Authorization: Bearer <your_jwt_token>
Body Parameters
The payment amount in the specified fiat currency. Must be greater than zero.
The fiat currency for the payment. Supported values: USD, LKR.
A human-readable description of what the payment is for. Displayed to the customer during checkout.
The customer’s email address. If provided, a payment receipt will be sent upon completion.
An arbitrary key-value object to attach to the payment. Useful for storing your internal order ID or reference codes.
The URL to redirect the customer to after the payment is completed or cancelled.
Response
Unique identifier for the payment.
Current payment status. One of: initiated, pending, confirming, paid, failed, expired.
The fiat amount of the payment.
The fiat currency (USD or LKR).
The equivalent amount in cryptocurrency (USDT) that the customer needs to send.
The blockchain wallet address the customer should send funds to.
URL to a QR code image encoding the crypto address and amount for easy scanning.
A hosted checkout page URL where the customer can complete the payment.
ISO 8601 timestamp indicating when the payment will expire if not completed.
Payment Statuses
| Status | Description |
|---|
initiated | Payment created, awaiting customer action |
pending | Customer has initiated the crypto transfer |
confirming | Transaction detected on-chain, waiting for confirmations |
paid | Payment confirmed and settled |
failed | Payment failed due to underpayment or transaction error |
expired | Payment window expired before receiving funds |
{
"amount": 25.00,
"currency": "USD",
"description": "Order #1234 - Premium Plan",
"customerEmail": "customer@example.com",
"metadata": {
"orderId": "order_1234",
"plan": "premium"
},
"redirectUrl": "https://yoursite.com/order/1234/complete"
}
{
"id": "pay_abc123def456",
"status": "initiated",
"amount": 25.00,
"currency": "USD",
"cryptoAmount": "25.032500",
"cryptoAddress": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef12",
"qrCodeUrl": "https://olp-api.nipuntheekshana.com/qr/pay_abc123def456.png",
"checkoutUrl": "https://olp-checkout.nipuntheekshana.com/pay/pay_abc123def456",
"expiresAt": "2026-03-26T15:30:00Z"
}