Skip to Content
HomeLink Hub
Earnings & Payouts

Withdraw from the wallet to a bank account

POST
/api/v1/earnings/withdraw

Access: Bearer token required.

Sends part of the caller's available wallet balance to a Nigerian bank account by Pandascrow bank transfer (POST /bank/transfers, drawn from the platform's Pandascrow wallet). amount is rounded to a whole number and must not exceed available from GET /earnings/wallet.

The destination defaults to the payout account saved on the profile. Sending accountNumber switches to a one-off destination taken entirely from the body (accountNumber, accountName, bankCode, bankName) without changing the saved account; in that case bankCode must be sent too. The account is not re-validated here.

A Payout record (purpose: wallet_withdrawal, sourceType: manual) is written as pending before the provider is called, moves to processing while the transfer is in flight, and ends as success or failed. The transfer is made synchronously: a 200 means the provider accepted it (status: success), a provider rejection returns 502 and leaves a failed payout in GET /earnings/payouts that no longer counts against the balance. Each call uses a fresh random idempotency key, so repeating the request creates a second withdrawal. No notification, socket event or email is sent by this API (the user's email is passed to the provider).

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Request Body

application/json
  1. body
amount*number

Amount to withdraw in the wallet currency's main unit (naira). Rounded to the nearest whole number; must be greater than zero and at most the available balance.

accountNumber?string

One-off destination account number. Omit to use the saved payout account. When present, the bank details are taken only from this request.

accountName?string

Name on the one-off account. Only used together with accountNumber.

bankCode?string

Bank code from GET /earnings/banks. Required when accountNumber is sent.

bankName?string

Display name of the bank, stored on the payout record. Only used together with accountNumber.

Response Body

The provider accepted the transfer. transactionRef is the provider's reference (can be null if it returned none).

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X POST 'http://localhost:4000/api/v1/earnings/withdraw' \  -H 'Content-Type: application/json' \  -d '{  "amount": 250000}'
Example Response
{  "status": 200,  "success": true,  "message": "Withdrawal submitted successfully",  "data": {    "_id": "66601b7e9b1d4a0012ab4a10",    "amount": 250000,    "currency": "NGN",    "status": "success",    "transactionRef": "PNDS-PAYOUT-51C07E2B",    "createdAt": "2026-11-25T09:12:40.118Z"  }}