{
"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"
}
Payments
Create Payment
Create a new payment intent and receive a crypto address for the customer to pay
POST
/
v1
/
payments
{
"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"
}
Authentication
This endpoint requires a Bearer token in theAuthorization header.
Authorization: Bearer <your_jwt_token>
Body Parameters
number
required
The payment amount in the specified fiat currency. Must be greater than zero.
string
required
The fiat currency for the payment. Supported values:
USD, LKR.string
required
A human-readable description of what the payment is for. Displayed to the customer during checkout.
string
The customer’s email address. If provided, a payment receipt will be sent upon completion.
object
An arbitrary key-value object to attach to the payment. Useful for storing your internal order ID or reference codes.
string
The URL to redirect the customer to after the payment is completed or cancelled.
Response
string
Unique identifier for the payment.
string
Current payment status. One of:
initiated, pending, confirming, paid, failed, expired.number
The fiat amount of the payment.
string
The fiat currency (
USD or LKR).string
The equivalent amount in cryptocurrency (USDT) that the customer needs to send.
string
The blockchain wallet address the customer should send funds to.
string
URL to a QR code image encoding the crypto address and amount for easy scanning.
string
A hosted checkout page URL where the customer can complete the payment.
string
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"
}