Skip to Content
HomeLink Hub
Earnings & Payouts

Get wallet balance

GET
/api/v1/earnings/wallet

Access: Bearer token required.

Returns the caller's wallet figures and the payout account saved on their profile. The wallet is a ledger computed on each request, not a stored balance: totalEarned is the sum of earned (net proceeds of completed escrows sold, split into escrow and shortlet; commission on completed purchases brokered; inspection fees on paid inspections), pending is seller proceeds on escrows still pending or funded, withdrawn is the total of payouts with status success, processing the total of payouts in pending or processing, and available = max(totalEarned - withdrawn - processing, 0).

payoutAccount is null when no account number is saved; otherwise only the last four digits of the number are returned. As a side effect, an account saved with a bank name but no bank code has its code looked up from the provider's bank list and written back to the profile.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

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

Response Body

Wallet summary plus the saved payout account (or payoutAccount: null).

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X GET 'http://localhost:4000/api/v1/earnings/wallet'
Example Response
{  "status": 200,  "success": true,  "message": "Wallet fetched successfully",  "data": {    "currency": "NGN",    "earned": {      "escrow": 42750000,      "commission": 0,      "inspection": 15000,      "shortlet": 360000    },    "totalEarned": 43125000,    "pending": 1485000,    "withdrawn": 42750000,    "processing": 0,    "available": 375000,    "payoutAccount": {      "bankName": "Guaranty Trust Bank",      "bankCode": "058",      "accountName": "Folake Adeyemi",      "accountNumberMasked": "••••6789"    }  }}