Core Lifecycles
How a listing, a legal review, an inspection, a booking and an escrow payment move from start to finish, across every app.
The apps are different windows onto the same few records. This page follows each record through its states, names the action that moves it, and says which app the action happens in. The status values are the exact strings stored in the database and returned by the API.
The whole journey
Listing
A listing has two independent states: status, which controls whether buyers can see it, and legalStatus, which records the lawyer's verdict. Search returns only listings that are listed and verified.
| Status | Visible in search | Set by |
|---|---|---|
draft | No. Only the creator sees it. | Saving with status: "draft" (POST /property/create) |
pending_verification | No | Creating without draft, or publishing a draft (POST /property/{id}/publish) |
listed | Yes, once verification.isVerified is true | The lawyer's verified decision; or an admin dismissing a duplicate flag on an already verified listing |
unlisted | No | An admin confirming a duplicate flag |
rented | No | Escrow completion with transactionType: "rent" |
sold | No | Escrow completion for any other transaction type |
Short-let listings stay bookable after a completed escrow; their status is not changed.
Creating or publishing a listing also runs the duplicate check. A listing that looks like a copy of a nearby one gets a duplicate flag, which holds it at pending_verification until an admin resolves it in the admin panel, even if the lawyer has already verified it. The lister is not told about the flag.
Where it happens: create a listing (dashboard), create a listing (mobile), duplicate listings (admin).
Legal review
Every submitted listing needs a lawyer's verdict before buyers can pay for it through escrow.
The lawyer works on an assignment, which has its own status:
| Assignment status | Moved by | Endpoint |
|---|---|---|
assigned | Lister or admin assigns a contracted partner lawyer; or automatic, when an admin has set a default legal partner | POST /legal/properties/{propertyId}/assign-lawyer |
accepted | Lawyer accepts | PATCH /legal/assignments/{assignmentId}/accept |
in_review | Lawyer starts the review; or the lister answers a change request with documents | PATCH .../start-review, POST .../documents |
verified, rejected, changes_requested | Lawyer's decision | PATCH .../decision |
reassigned | Lister moves the work to another lawyer | PATCH .../reassign |
A lister can only assign a lawyer they have a contracted partnership with. Partnerships start as an email invite from the lister (invite_pending), which the lawyer accepts (contracted) or rejects (rejected) in the lawyer portal.
Where it happens: legal verification (dashboard), legal team (mobile), lawyer portal, lawyer assignments (mobile).
Inspection
An inspection is a paid tour of the property. It does not need a booking.
| Step | Who | Endpoint | Effect |
|---|---|---|---|
| Request | Tenant | POST /inspection/request | status: pending_review, paymentStatus: unpaid. The listing agent (or landlord) is notified. |
| Approve or reject | Agent or landlord | PATCH /inspection/{id}/review | Approve moves it to in_progress; reject moves it to cancelled. The tenant is notified. |
| Pay | Tenant | POST /transaction/inspection/initialize, then Paystack checkout | The fee is set by the server: the agent's own inspection fee, else the platform default. |
| Confirm payment | Tenant app or Paystack | GET /transaction/inspection/verify/{reference} or the Paystack webhook | paymentStatus: paid, status: scheduled. Added to the tenant's Google Calendar if connected. |
No endpoint completes an inspection
completed exists in the status list, but PATCH /inspection/{id}/complete is a stub that changes nothing. Inspections stop at scheduled today.
Where it happens: tour requests (web), booking an inspection (mobile), inspection requests (dashboard), site visits (admin).
Booking and payment request
A booking records a tenant's intent and the owner's answer. There are three types:
| Type | Meaning | Dates |
|---|---|---|
viewing | A visit request | requestedDate |
reservation | A "request payment" for renting or buying. Only one open reservation per tenant per property. | requestedDate |
shortlet | A stay on a short-let listing. Nights are held immediately. | checkIn, checkOut |
Accepting a reservation or shortlet sends the tenant a "Your Payment Request Was Accepted" notification. That is the tenant's cue to pay. Cancelling a short-let releases its held nights. Both changes are pushed live to both sides as booking:updated.
Where it happens: booking and escrow payment (web), bookings and payment requests (dashboard), bookings and payment requests (mobile).
Escrow payment
Rent and sale payments are held by Pandascrow until the buyer releases them. The platform setting paymentMode (ESCROW or DIRECT) decides which path the apps offer; DIRECT uses a plain Paystack checkout instead.
cancelled is an allowed value, but no code sets it today.
| Step | Who | Endpoint | Effect |
|---|---|---|---|
| Start | Buyer | POST /escrow/initialize | The listing must be legally_verified. The server adds the platform fee to the amount and opens the escrow at Pandascrow. Returns a payment link. An EscrowTransaction (pending) and a linked booking are stored. |
| Fund | Buyer, at Pandascrow | Pandascrow escrow.paid webhook | pending to funded. Buyer, seller and agent are notified. |
| Report payment (fallback) | Buyer | PATCH /escrow/{id}/payment-made | pending to funded on the buyer's word, with optional proof of payment. |
| Resend OTP | Buyer | POST /escrow/{id}/resend-otp | Pandascrow sends a fresh release code. Once per minute. |
| Release | Buyer | PATCH /escrow/{id}/request-completion | Pandascrow checks the OTP and releases the money. funded to completed; listing becomes rented or sold. |
| Payouts | Server | Background job after completion | Seller paid to their bank (or wallet if no bank account), agent commission paid, platform fee swept if auto-sweep is on. |
Who gets what
For a base amount A:
| Party | Amount | Setting |
|---|---|---|
| Buyer pays | A + platform fee | platformPropertyFeePercent, default 1% |
| Agent receives (purchases with an assigned agent only) | A x agentCommissionPercent | default 5% |
| Seller receives | A - agent commission | |
| Platform keeps | The platform fee | Swept automatically if autoSweepPlatformFees is on |
Sellers and agents withdraw anything left in their wallet from the earnings screens.
Where it happens: booking and escrow payment (web), escrow (dashboard), earnings and withdrawals (dashboard), earnings and payouts (admin).
Notifications along the way
Most transitions above notify the other party. One call in the service fans out to up to four channels, each switched by the recipient's notification preferences:
- A stored notification, pushed live as the Socket.IO event
notifications:new. - An Expo push to the user's phones.
- An email.
- An SMS, when enabled on the server (off today).
See Realtime events for the full list of events and who receives them.
HomeLink Hub