Skip to Content
HomeLink Hub
MobileAgent

Earnings and Payouts

What the Earnings screen shows, where the payout bank account is validated, and which wallet and withdrawal features are not in the mobile app.

The mobile app gives agents and landlords a read-only view of what they have earned. The payout bank account is captured and validated once, during agent setup. Wallet balances, withdrawals and payout history exist in the backend but have no mobile screens.

Where it lives

ScreenRouteFileWho sees it
Earnings/(tabs)/earnings (pushed as /earnings)app/(tabs)/earnings.tsxAnyone in the (tabs) navigator, opened from Profile
Profile, Business section/(tabs)/profileapp/(tabs)/profile/index.tsxEntry point: Earnings row
Payment Details step (bank validation)/agent-onboarding (step 4 of 5)components/onboarding/step-bank-details.tsxAgents during setup

Supporting code: services/earnings/earnings-api.ts (RTK Query slice earningsApi, tag Earnings), hooks/use-bank-account-verification.ts, lib/bank-account.ts.

Before you start

  • Signed in with a role that lands in (tabs). earnings is registered with href: null, so it has no tab bar icon; it is opened from Profile, then Business, then Earnings ("What you have earned and what is in escrow").
  • The Profile row is not role-gated in code, so a lawyer also sees it. The data only makes sense for agents and landlords.
  • Nothing is earned until a buyer or tenant has paid: rows come from escrow transactions where the user is the seller, paid inspection fees, and agent commissions on completed purchases.

Flow

View earnings

  1. From Profile, tap Earnings. The screen shows a back chevron and the title Earnings.

  2. One request fires: GET /api/v1/earnings?page=1&limit=50. The response data (summary, transactions, pagination) is cached by RTK Query. Nothing is written to AsyncStorage.

  3. The summary block is rendered from summary:

    UI labelFieldCaption
    Total earnedtotalNet"From n transactions, after platform fees" (uses completedCount; singular "transaction" when it is 1)
    In escrowpendingNet"Not yet released"
    This monththisMonthNet"Net earned"
    Gross receivedtotalGross
    Platform feestotalPlatformFeesshown with a leading minus sign
    Your earningstotalNet
  4. Amounts are formatted as currency in the en-NG locale with no decimals, using summary.currency (default NGN).

  5. Under the heading Transactions, each row shows:

    • Property title, or "Property removed" when the property no longer exists.
    • A status badge (see below).
    • "community, state" when available.
    • You receive with netAmount.
    • "Buyer paid" with grossAmount, "fee" with platformFee, and the date (completedAt, else createdAt, as MMM D, YYYY).
  6. Rows are not tappable. There is no detail screen, filter, or paging; only the first 50 transactions are loaded.

  7. Pull down to refetch.

Status badges

Transaction statusBadge labelNotes
pendingPendingEscrow transaction not yet funded
fundedIn escrowPaid into escrow, not yet released. Paid inspection fees also report as funded until the inspection is completed
completedPaid outOnly these rows count toward Gross received, Platform fees and the transaction count
disputedDisputed
cancelledCancelled

The mobile types have drifted from the backend response

services/earnings/earnings-api.ts describes an older response shape than the one service/src/controllers/earnings.controller.ts returns today. The differences below change what the screen shows.

  • The backend sends the other party as counterparty, but the row reads buyer, so the buyer's name line never renders.
  • summary.netIsDerived is no longer returned, so the note "Fees are calculated from current platform rates and may differ slightly for older transactions." never appears.
  • The backend also returns a wallet object (available, withdrawn, processing, pending) and a per-row payout object with the bank transfer state. The mobile screen ignores both. The Paid out badge is driven by the transaction being completed, not by an actual transfer having been made.
  • Inspection fees and agent commissions are in the same feed. They are labelled "Buyer paid" like property sales, with a fee of zero.

Bank account validation (agent setup only)

The only place the mobile app collects and validates a payout account is the Payment Details step of agent setup. The full step is documented in Agent onboarding and KYC; the validation mechanics are:

  1. The step loads the bank list with GET /api/v1/user/banks. While it loads the field shows "Loading banks…". The agent picks a bank from the Select your bank sheet (with a Search banks box; "No banks found." when nothing matches).

  2. Account number accepts digits only and is cut to 10 characters.

  3. As soon as a bank is chosen and the number is exactly 10 digits, the hook waits 500 ms and fires POST /api/v1/user/bank-details/verify with accountNumber and bankCode. The holder field shows "Confirming with your bank…".

  4. On success the returned name fills the read-only Account holder name field and a green tick appears. Changing the bank or the number clears the name and verifies again.

  5. On failure the field error shows the server message, or "We could not confirm this account. Check the number and bank.".

  6. Field rules from lib/bank-account.ts:

    FieldRuleMessage
    Bank nameRequired"Select your bank."
    Account numberRequired"Enter your account number."
    Account numberExactly 10 digits"Account number must be exactly 10 digits."
    Account numberMust be verified when the bank list loaded"We could not confirm this account. Check the number and bank."
    Account holder nameRequired"Account holder name is filled in once your account is verified." (or "Enter the name on the account." in fallback mode)
    SWIFT / IBAN (optional)8 to 34 letters or digits"Enter 8-34 letters or digits, with no spaces."
  7. Saving the step fires PUT /api/v1/user/bank-details. A failed validation shows the toast "Please fix the highlighted bank details.".

  8. If the bank list cannot be loaded, the step falls back to plain text inputs with no verification, so setup is never blocked.

No way to change the bank account after setup

The Profile screens for agents and landlords (app/(tabs)/profile/**) have no bank details screen. After setup, the saved account can only be changed outside the mobile app.

What is not available on mobile

Wallet, withdraw and payouts have no mobile screens

The backend exposes a full wallet and payout API in service/src/routes/earnings.routes.ts, but the mobile app calls none of it. Only GET /api/v1/earnings is used. An agent who needs to withdraw or track a payout must do it outside the mobile app.

Backend endpointPurposeMobile app
GET /api/v1/earnings/walletAvailable, held and withdrawn balanceNot used
GET /api/v1/earnings/banksBank list for payoutsNot used (setup uses GET /api/v1/user/banks)
POST /api/v1/earnings/banks/validateValidate a payout accountNot used (setup uses POST /api/v1/user/bank-details/verify)
POST /api/v1/earnings/withdrawWithdraw from the walletNot used
POST /api/v1/earnings/:id/dispatchSend one earning to the bankNot used
GET /api/v1/earnings/payoutsPayout historyNot used

There is also no seller-side escrow screen. Marking a payment as made, the release OTP and escrow completion are all on the buyer's screen (app/property/escrow/[id].tsx) in the tenant flow.

States and edge cases

SituationWhat the user sees
First loadCentred spinner; no summary block until data arrives
Request failedAlert icon, "Couldn't load earnings" and Try again. The summary block is hidden
No transactionsSummary block with zero amounts, then "No Earnings Yet" / "Completed bookings and sales will show up here."
Unknown status valueRaw status string in a grey badge
Non-numeric amountFormatted as zero
Session expiredThe shared base query refreshes the token once, then signs the user out to /(auth)/signin if that fails

What happens next

Nothing on the Earnings screen changes server state. Totals move when the backend completes an escrow transaction or an inspection, and the screen picks that up on the next open or pull to refresh. There is no socket subscription on this screen.

On this page