Skip to Content
HomeLink Hub
Admin

Withdraw platform revenue

POST
/api/v1/admin/withdraw

Access: Bearer token required. Roles: ADMIN. Also requires: Requested amount must not exceed the available platform balance; A platform payout account must be configured unless a one-off destination is supplied.

Sends platform revenue to a bank account through the payment provider. amount is rounded to the nearest whole number and must not exceed wallet.available from GET /api/v1/admin/earnings. By default the money goes to the configured platform payout account; sending accountNumber (with bankCode) in the body redirects this one withdrawal to another account without changing the stored one. A Payout record is written first (beneficiaryType: platform, purpose: platform_withdrawal, sourceType: manual, initiatedBy = the calling admin, a random idempotency key) and the transfer is then dispatched synchronously: the payout moves pending -> processing -> success or failed. On failed the endpoint answers 502, but the failed payout record remains and is visible in GET /api/v1/admin/payouts. Each call uses a fresh idempotency key, so retrying after a failure creates a new payout. No email or notification is sent.

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 NGN. Coerced with Number() and rounded; must be greater than zero.

accountNumber?string

One-off destination account number. When present, the stored payout account is ignored for this withdrawal.

bankCode?string

Bank code for the one-off destination. Effectively required when accountNumber is sent; omitting it produces the 'No platform payout account configured' error.

accountName?string

Holder name for the one-off destination.

bankName?string

Bank name for the one-off destination.

Response Body

The provider accepted the transfer

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X POST 'http://localhost:4000/api/v1/admin/withdraw' \  -H 'Content-Type: application/json' \  -d '{  "amount": 1500000}'
Example Response
{  "status": 200,  "success": true,  "message": "Withdrawal submitted successfully",  "data": {    "_id": "6660a7d49b1d4a0012ab3530",    "amount": 1500000,    "currency": "NGN",    "status": "success",    "transactionRef": "TRF_9f2c1a7b4e",    "createdAt": "2026-06-06T10:30:00.000Z"  }}