Documentation Index
Fetch the complete documentation index at: https://docs-openpay.nipuntheekshana.com/llms.txt
Use this file to discover all available pages before exploring further.
List All Withdrawals
Page number for pagination.
Items per page (max 100).
Filter by withdrawal status. One of pending, approved, rejected, processing, completed, failed.
Filter withdrawals by a specific merchant.
Filter withdrawals created on or after this date (ISO 8601).
Filter withdrawals created on or before this date (ISO 8601).
Example Request
curl -X GET "https://olp-api.nipuntheekshana.com/v1/admin/withdrawals?status=pending&page=1&limit=10" \
-H "Authorization: Bearer <admin_token>"
Example Response (200)
{
"data": [
{
"id": "wd_xyz789",
"merchantId": "merch_abc123",
"merchantName": "Acme Payments Ltd",
"amount": "500.00",
"currency": "USDT",
"destinationAddress": "0xabcd...1234",
"network": "BSC",
"status": "pending",
"requestedAt": "2026-03-25T12:00:00Z",
"updatedAt": "2026-03-25T12:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 8,
"totalPages": 1
}
}
Get Withdrawal Details
The unique withdrawal identifier.
Example Request
curl -X GET "https://olp-api.nipuntheekshana.com/v1/admin/withdrawals/wd_xyz789" \
-H "Authorization: Bearer <admin_token>"
Example Response (200)
{
"id": "wd_xyz789",
"merchantId": "merch_abc123",
"merchantName": "Acme Payments Ltd",
"amount": "500.00",
"fee": "2.50",
"netAmount": "497.50",
"currency": "USDT",
"destinationAddress": "0xabcd...1234",
"network": "BSC",
"status": "pending",
"txHash": null,
"requestedAt": "2026-03-25T12:00:00Z",
"reviewedAt": null,
"completedAt": null,
"reviewedBy": null,
"notes": null
}
Approve Withdrawal
Approve a pending withdrawal request for processing.
The unique withdrawal identifier.
Optional internal notes for the approval.
Example Request
curl -X POST "https://olp-api.nipuntheekshana.com/v1/admin/withdrawals/wd_xyz789/approve" \
-H "Authorization: Bearer <admin_token>" \
-H "Content-Type: application/json" \
-d '{"notes": "Verified merchant identity and destination address"}'
Example Response (200)
{
"id": "wd_xyz789",
"status": "approved",
"reviewedBy": "admin_user_001",
"reviewedAt": "2026-03-26T09:15:00Z",
"message": "Withdrawal approved successfully"
}
Reject Withdrawal
Reject a pending withdrawal request. The funds are returned to the merchant’s balance.
The unique withdrawal identifier.
The reason for rejecting the withdrawal.
Example Request
curl -X POST "https://olp-api.nipuntheekshana.com/v1/admin/withdrawals/wd_xyz789/reject" \
-H "Authorization: Bearer <admin_token>" \
-H "Content-Type: application/json" \
-d '{"reason": "Destination address does not match verified wallet"}'
Example Response (200)
{
"id": "wd_xyz789",
"status": "rejected",
"reviewedBy": "admin_user_001",
"reviewedAt": "2026-03-26T09:20:00Z",
"message": "Withdrawal rejected successfully"
}
Mark Withdrawal as Completed
Mark an approved withdrawal as completed after the on-chain transfer has been confirmed.
The unique withdrawal identifier.
The blockchain transaction hash confirming the transfer.
Example Request
curl -X POST "https://olp-api.nipuntheekshana.com/v1/admin/withdrawals/wd_xyz789/complete" \
-H "Authorization: Bearer <admin_token>" \
-H "Content-Type: application/json" \
-d '{
"txHash": "0x9f8e7d6c5b4a3210fedcba9876543210abcdef01234567890abcdef012345678",
"notes": "Confirmed on BscScan"
}'
Example Response (200)
{
"id": "wd_xyz789",
"status": "completed",
"txHash": "0x9f8e7d6c5b4a3210fedcba9876543210abcdef01234567890abcdef012345678",
"completedAt": "2026-03-26T10:00:00Z",
"message": "Withdrawal marked as completed"
}
Error Responses
{
"error": {
"code": "NOT_FOUND",
"message": "Withdrawal not found"
}
}
{
"error": {
"code": "CONFLICT",
"message": "Withdrawal is not in a valid state for this action"
}
}