PAID payments (optionally scoped to a single branch) into a settlement request.
Endpoints
| Method | Endpoint | Description | Rate Limit |
|---|---|---|---|
| POST | /v1/withdrawal | Create a withdrawal request | 10 req/min |
| GET | /v1/withdrawal/list | List withdrawal requests | 100 req/min |
| GET | /v1/withdrawal/:id | Get withdrawal request details | 100 req/min |
Create Withdrawal Request
Creates a withdrawal request for all currently unsettledPAID payments belonging to your merchant account (or a single branch, if branchId is provided).
Authentication
Requires HMAC authentication with headers:x-api-key: Your API key ID only (e.g.,ak_live_xxx)x-timestamp: Current Unix timestamp in millisecondsx-signature: HMAC-SHA256 signature (using derived signing key)
Example Request
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
branchId | string (UUID) | No | If provided, only unsettled payments for this branch are included. If omitted, all unsettled merchant-level payments are included. |
Example Response (201 Created)
Notes
- Attribution: Withdrawal requests created via the public API record the
apiKeyIdof the API key that made the request;requestedBy/requesterName(dashboard user info) will benull/"API"for these requests. - One request per day: Only one active (
PENDINGorAPPROVED) withdrawal request is allowed per merchant per day. - Minimum amount: The total net amount must meet the platform’s configured minimum withdrawal threshold, or the request is rejected with
400. - Auto-approval: If the total net amount is below the platform’s configured auto-approval threshold, the request is automatically approved and the fund transfer to your bank account is initiated immediately — the response may already reflect
status: "APPROVED"in that case. Otherwise, the request staysPENDINGuntil reviewed by CeyLabs admins, and the fund transfer happens upon approval. - Locking: Payments included in a withdrawal request are locked (cannot be included in another request) until the request is approved or rejected. Rejected requests release their payments back into the unsettled pool.
List Withdrawal Requests
Retrieve a paginated list of withdrawal requests for your merchant account.Authentication
Requires HMAC authentication with headers:x-api-key: Your API key ID only (e.g.,ak_live_xxx)x-timestamp: Current Unix timestamp in millisecondsx-signature: HMAC-SHA256 signature (using derived signing key)
Example Request
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1). |
limit | number | Items per page, max 100 (default: 10). |
status | string | Filter by status: ALL, PENDING, APPROVED, REJECTED, CANCELLED (default: ALL). |
startDate | string | Filter by settlement date, ISO 8601 (inclusive). |
endDate | string | Filter by settlement date, ISO 8601 (inclusive). |
sortBy | string | Field to sort by: settlement_date, created_at, total_gross_amount_lkr, status (default: settlement_date). |
sortOrder | string | asc or desc (default: desc). |
Example Response (200 OK)
Get Withdrawal Request
Get details of a specific withdrawal request, including the payments included in it.Authentication
Requires HMAC authentication with headers:x-api-key: Your API key ID only (e.g.,ak_live_xxx)x-timestamp: Current Unix timestamp in millisecondsx-signature: HMAC-SHA256 signature (using derived signing key)
Example Request
Example Response (200 OK)
Error Codes
| Status | Description |
|---|---|
| 400 | Bad Request - No unsettled payments, below minimum withdrawal amount, or a withdrawal request already exists for today. |
| 401 | Unauthorized - Invalid signature. |
| 403 | Forbidden - Merchant account is inactive or not approved. |
| 404 | Not Found - Withdrawal request not found. |
| 429 | Too Many Requests - Rate limit exceeded. |