{
"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
A human-readable description of what the payment is for. Displayed to the customer during checkout.
An arbitrary key-value object to attach to the payment. Useful for storing your internal order ID or reference codes.
Response
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"
}