Agent Onboarding and KYC
The mandatory five-step agent setup (identity, agency profile, notifications, payout bank account, inspection schedule) and the standalone NIN verification screen in Profile.
Where it lives
| Screen route | File | Who sees it |
|---|---|---|
/agent-onboarding | app/agent-onboarding/index.tsx (stack in app/agent-onboarding/_layout.tsx) | Users whose role is AGENT, until setup is complete |
| Step 1, Verify Identity | components/onboarding/step-identity.tsx | Agents in setup |
| Step 2, Agency Profile | components/onboarding/step-agency-profile.tsx | Agents in setup |
| Step 3, Notifications | components/onboarding/step-notifications.tsx | Agents in setup |
| Step 4, Payment Details | components/onboarding/step-bank-details.tsx | Agents in setup |
| Step 5, Inspection Schedule | components/onboarding/step-availability.tsx | Agents in setup |
/(tabs)/profile/kyc (pushed as /profile/kyc) | app/(tabs)/profile/kyc.tsx | Anyone in the (tabs) navigator whose profile has isKYCVerified false |
Supporting code: hooks/use-agent-onboarding.ts (step list and completion rules), utils/home-route.ts (post-auth routing), services/kyc/kyc-api.ts, services/settings/settings-api.ts, hooks/use-bank-account-verification.ts, lib/bank-account.ts.
Before you start
- Only the
AGENTrole is put through setup. Landlords, lawyers and developers share the(tabs)navigator but skip it (roleNeedsAgentOnboarding). - The user must be signed in. Every call below sends the bearer access token.
- Identity needs the agent's 11-digit NIN, and the name on the NIN must match the name on the account.
- Payout details need a Nigerian bank account (10-digit NUBAN).
- No device permission (camera, photos, location) is requested anywhere in this flow.
How an agent ends up here
There are two doors, and both lead to the same screen.
- After authentication. Sign in, sign up and the launch screen all call
postAuthRouteForRole. ForAGENTit returns/agent-onboardingunconditionally; every other professional role goes to/(tabs)and tenants go to/tenant. - The tab gate.
app/(tabs)/_layout.tsxloads the profile for agents (GET /api/v1/user/profile) and, once the profile has arrived, renders a redirect to/agent-onboardingwhenisAgentOnboardingComplete(profile)is false. This catches deep links and any other route into the tabs. The gate waits for the profile, so a fully set-up agent is not bounced on a cold start.
On opening, the setup screen loads GET /api/v1/user/profile and GET /api/v1/auth/kyc/status, shows a centred spinner until the profile is in, and then:
- if nothing blocking is outstanding, immediately does
router.replace("/(tabs)"), so a finished agent sees only a brief spinner; - otherwise opens on the first incomplete step and prefills the form from the profile (agency name, bio, bank name and code, availability, notification preferences).
Progress is read from the server, never from the device. Nothing is written to AsyncStorage; state lives in the RTK Query caches settingsApi (tag Profile) and kycApi (tag KYC). Both queries are refetched every time the app returns to the foreground, so a step finished on the web or another phone shows up.
What counts as complete
| Step | Title (stepper label) | Complete when the profile has | Blocks finishing |
|---|---|---|---|
| 1 | Verify Identity (Identity) | isKYCVerified true | Yes |
| 2 | Agency Profile (Agency) | a non-empty businessName | Yes |
| 3 | Notifications (Alerts) | notificationPreferencesConfirmedAt set | No |
| 4 | Payment Details (Payout) | bankDetails.bankName and bankDetails.accountHolderName | Yes |
| 5 | Inspection Schedule (Schedule) | at least one entry in agentAvailability.availableDays | Yes |
Flow
The setup shell
- The header shows Step N of 5 and X% complete (completed steps divided by five, rounded).
- Under it is a five-dot stepper. A completed step shows a tick, the current one is outlined. Tapping any other dot jumps straight to that step; dots are disabled while a save is in flight.
- The footer has a back arrow (from step 2 onwards) and one primary button. Its label is Complete verification above on step 1 until identity is verified (disabled), Finish setup on step 5, and Continue everywhere else. There is no Skip.
- There is no header back button and swipe-back is disabled. The Android hardware back button goes to the previous step; on step 1 it stays put and shows the toast Finish setting up your account / "You will be able to list properties once this is done."
- Any save that fails shows the toast Could not save with the server's message, or "Please try again."
Step 1: Verify Identity
- The card is titled National Identity Number. Enter the NIN in the field with placeholder "Enter your 11-digit NIN". Non-digits are stripped as you type and the field stops at 11 characters.
- Tick the consent checkbox: "I agree to HomeLink verifying my identity with the National Identity Management Commission through Youverify."
- Tap Verify identity. Client-side checks, in order:
- fewer than 11 digits: toast A NIN is 11 digits.
- consent not ticked: toast Please agree to the identity check first.
- The app sends
POST /api/v1/auth/kyc/verifywith body{ "kycType": "NIN", "nin": "..." }. The consent flag is checked on the device only; it is not part of the request body. - On success the toast reads Identity verified with "Welcome, FirstName." The cached profile is patched to
isKYCVerified: truewhen the returned status isVERIFIED, theProfileandKYCtags are invalidated, and the flow moves to step 2 on its own. - On failure the toast reads Verification failed with the server message. The backend returns "That NIN could not be found. Please check and try again." (404), "The name on this NIN does not match the name on your account." (400) or "KYC is already verified for this account." (400). With no message the fallback is "We could not verify that NIN. Please check it and try again."
- When the KYC status is already
VERIFIEDthe card shows Your identity is verified. with a green tick and no form, and the footer button becomes Continue.
KYC status values are PENDING, AWAITING_LIVENESS, VERIFIED and REJECTED. Only VERIFIED counts on this step; an account left at AWAITING_LIVENESS sees the form again and finishes by resubmitting the NIN.
Liveness check is not in the flow
The code comments state that liveness is temporarily disabled: a passing NIN and name match alone verifies the account. components/onboarding/liveness-webview.tsx and the kycApi endpoints GET /api/v1/auth/kyc/liveness/session and POST /api/v1/auth/kyc/liveness/confirm exist but no screen uses them.
Step 2: Agency Profile
| Field | Rule |
|---|---|
| Agency name (required), placeholder "e.g. Misongo Realty", hint "Shown on every property you list." | Must not be blank after trimming, otherwise toast Please enter your agency name. |
| About you, hint "Optional, but profiles with a description get more enquiries." | Optional, multi-line |
Continue sends PUT /api/v1/user/personal-info with businessName and bio, both trimmed. The backend caps businessName at 100 characters and bio at 500; the app does not check length, so going over shows as the Could not save toast.
Step 3: Notifications
Five cards, each with three switches: In app & push, Email and SMS · Soon (always off and disabled).
| Card | Hint | Preference key |
|---|---|---|
| Property enquiries | When someone asks about a listing | propertyInquiries |
| Inspection bookings | When a viewing is booked or changed | inspectionBookings |
| Payments | When money moves in or out of escrow | paymentConfirmations |
| Messages | Direct messages from clients | newMessages |
| Product updates | Occasional news from HomeLink | systemUpdates |
Continue always sends PUT /api/v1/user/notification-preferences, even when nothing changed, because the server stamps notificationPreferencesConfirmedAt on every save and that stamp is what marks the step done. This step never blocks Finish setup.
Step 4: Payment Details
- A notice explains: "Your details are securely encrypted and only used for payout processing. We confirm the account with your bank before saving it."
- Bank name. While the list loads (
GET /api/v1/user/banks) the field reads "Loading banks…". Then it is a selector reading "Search for your bank"; tapping it opens the Select your bank sheet with a Search banks box. Banks are de-duplicated by name and sorted alphabetically; no match shows "No banks found." Choosing a bank stores its name and code and clears the holder name. - Account number. Digits only, exactly 10. As soon as a bank is chosen and 10 digits are entered, the app waits 500 ms and sends
POST /api/v1/user/bank-details/verifywithaccountNumberandbankCode. A spinner shows in the field while it runs, then a green tick. - Account holder name. Read-only. It reads "Filled in automatically once verified", then "Confirming with your bank…", then the name returned by the bank. If the lookup fails, the account number shows the server message or "We could not confirm this account. Check the number and bank."
- SWIFT / IBAN (optional). Letters and digits only, forced to upper case.
- Continue validates, then sends
PUT /api/v1/user/bank-detailswithbankName,bankCode,accountHolderName,accountNumberandswiftIban. After a successful save the account number and SWIFT/IBAN are wiped from the form.
| Field | Error message |
|---|---|
| Bank name empty | Select your bank. |
| Account number empty | Enter your account number. |
| Account number not 10 digits | Account number must be exactly 10 digits. |
| Account not verified (when the bank list loaded) | We could not confirm this account. Check the number and bank. |
| Holder name empty (bank list loaded) | Account holder name is filled in once your account is verified. |
| Holder name empty (fallback mode) | Enter the name on the account. |
| SWIFT / IBAN present but not 8 to 34 letters or digits | Enter 8-34 letters or digits, with no spaces. |
Any error also raises the toast Please fix the highlighted bank details.
The profile never returns the account number. So when bank details are already saved and the agent has not typed a new number, changed the bank or entered a SWIFT/IBAN, Continue skips validation and saving and simply moves on.
Step 5: Inspection Schedule
| Field | Rule |
|---|---|
| Days you show properties (required): Mon to Sun chips | At least one, otherwise toast Pick at least one day you can show properties. Saved in week order. |
| Start time / End time | Free-text inputs, defaults 09:00 and 17:00. The app does not validate them; the backend requires 24-hour HH:mm. |
| Length of each viewing | One of 30m, 45m, 60m, 90m. Default 60. |
Finish setup sends PUT /api/v1/user/agent-availability, then confirms with the server before leaving:
- It refetches
GET /api/v1/user/profile. - If no blocking step is open, it does
router.replace("/(tabs)")and the agent lands on the dashboard (see Dashboard and Tabs). - If a blocking step is still open, it jumps to that step with the toast "(step title) still needs finishing" / "Complete this step to finish setting up your account."
- If the refetch fails, the toast is Could not confirm your setup / "Please try again."
Identity verification from Profile
This is the only identity route for landlords and lawyers, who never see the setup flow.
- On the Profile tab the pill next to the name reads Verified or Unverified. While unverified, the Account Management section shows the row Identity Verification with subtitle "Complete your KYC (NIN)". The row disappears once
isKYCVerifiedis true. - Tapping it pushes
/profile/kyc, titled Identity Verification, with a close button, the heading Verify your identity and one field, National Identity Number (NIN) (placeholder "e.g. 12345678901", digits only, 11 maximum). - Verify Identity stays disabled until 11 digits are entered. If it is somehow submitted short, an alert reads Invalid NIN / "Please enter a valid 11-digit NIN."
- The screen dispatches the
verifyKYCthunk:POST /api/v1/auth/kyc/verifywithkycTypeset toNINand thenin. - Success: toast Identity Verified! / "Your identity has been successfully verified." and the screen closes back to Profile.
- Failure: alert Verification Failed with the server message, or "Could not verify your identity. Please check your NIN and try again."
Differences from the onboarding step
This screen has no consent checkbox. It also uses the older axios thunk rather than kycApi, so nothing patches or invalidates the cached profile: the Profile pill and the Identity Verification row can keep showing the unverified state until the profile is next refetched.
States and edge cases
- Loading: a full-screen spinner until the profile has loaded and the opening step is chosen. If the profile request fails there is no error state; the spinner stays.
- Step 3 with no preferences on the profile: the cards are rendered only when the profile carries
notificationPreferences. Without them the step body is empty and Continue saves an empty object. - Bank list unavailable: if
GET /api/v1/user/banksfails or returns nothing, Bank name becomes a plain text input (placeholder "e.g. First Bank Nigeria") and Account holder name becomes editable (placeholder "Full name as on account"). No lookup is made and verification is not required to save. - Changing bank or number after verifying: the holder name is cleared and the lookup runs again; a result for a different bank or number is ignored.
- Jumping ahead with the stepper: allowed, but Finish setup always re-checks every blocking step with the server.
- Done elsewhere: steps completed on the web count here, and the flow opens on the first gap rather than at step 1.
- Role switch on one device: signing out resets the whole Redux store, so a previous account's cached profile cannot satisfy or trigger the gate.
What happens next
- Completing setup unlocks the
(tabs)navigator for the agent; until then every route into it redirects back. - The agency name is shown on the agent's listings, per the hint on step 2.
- Availability drives the inspection slots tenants can book (code comment in
step-availability.tsx); the tenant-side booking page covers how unavailable days are greyed out. - The saved bank account is what payouts use. The mobile app has no withdraw screen; see Earnings and Payouts.
Help and Support
The in-app Help Center (search, topics, articles, FAQs) and the Contact Support form that composes an email to the support team.
Dashboard and Tabs
How the professional (tabs) navigator is assembled per role, what the Home dashboard shows, the screens that hide behind it, and the first-launch tour.
HomeLink Hub