Tour Requests and Inspection Payment
Requesting a property tour, tracking it under My Inspections, paying the inspection fee through Paystack and adding it to Google Calendar.
A "tour" on the property page and an "inspection" under the account menu are the same record. The tenant picks a slot, the agent approves it, the tenant pays the inspection fee, and the inspection becomes scheduled.
Where it lives
| Route | View / component file | Access |
|---|---|---|
/app/property/:id (Request Tour dialog) | src/components/landing/property-detail.tsx | signed-in |
/app/inspections | src/views/app/inspections.tsx | signed-in |
/app/inspections/verify | src/views/app/inspection-payment-verify.tsx | signed-in, reached from the Paystack redirect |
| Google Calendar prompt | src/components/app/connect-google-calendar.tsx | signed-in |
Requests are defined in src/services/property/property-thunk.ts (inspections), src/services/payment/payment-thunk.ts (payment) and src/services/calendar/calendar-thunk.ts.
Before you start
- Signed in. Signed-out visitors who click Request Tour get the "Sign In Required" alert.
- The listing is not a short-let (short-lets have no Request Tour button) and is not sold or rented (the button is disabled).
- The inspection must have been approved by the agent before it can be paid for.
KYC
The How it works page says identity is verified at this step, but nothing in this app checks KYC before requesting or paying for an inspection. If the backend enforces it, the user sees the backend's error message in the dialog and a toast.
Flow
Request a tour
- On a property page click Request Tour. The dialog "Request a Property Tour" opens with a calendar on the left and time slots on the right, and fires
GET /api/v1/inspection/availability/:propertyId. - Pick a date. Past dates are disabled, and so are weekdays outside the agent's
availableDays. If the agent has not configured any days, every future date can be picked. - Picking a date refetches availability with
?date=yyyy-MM-dd. The right side reads "Available slots for Friday, Mar 6" and lists each slot as a start and end time; the end is the start plus the agent's slot length (60 minutes when not set). - Select one slot. Optionally fill Notes (optional) ("Any specific rooms or features you'd like to see?").
- Confirm Tour Request stays disabled until a slot is selected. It fires
POST /api/v1/inspection/requestwithpropertyId,scheduledDate(the slot's timestamp) andnotes. - Success: the dialog closes and resets, with the toast "Tour request submitted! The agent will confirm shortly."
- Failure: the server's message (or "Failed to request tour. Please try again.") shows in the dialog and as a toast; the selection is kept.
The dialog also shows the listing's photo and title, the agent's name once availability has loaded, and the note "Once confirmed by the agent, this tour will be added to your HomeLink Hub calendar."
Track inspections
- Open Inspections from the account menu (
/app/inspections). The page firesGET /api/v1/inspection/myand shows "My Inspections" with "N inspections scheduled". - Each row shows the listing photo and title, a status badge, the location, the date and the time, and "Note: REASON" when the inspection carries a cancellation reason.
- Clicking a row adds
?ref=INSPECTION_ID&paymentType=inspectionto the URL, which opens a status dialog. Closing the dialog removes those params. Because it is URL-driven, a link withrefopens the dialog directly.
status | Badge | Dialog title | Right-hand button |
|---|---|---|---|
pending_review | Pending Review | Inspection Awaiting Approval | Okay (closes) |
in_progress | Payment Pending | Inspection Approved | Make Inspection Payment |
scheduled | Scheduled | Inspection Scheduled | Okay (closes) |
completed | Completed | Inspection Completed | View Property (opens the listing) |
cancelled | Cancelled | Inspection Cancelled | Browse Properties (to /app) |
Every dialog also has a Close button and a "Next step" line, for example "Next step: Complete inspection payment via Paystack."
Pay the inspection fee
- Open an inspection whose badge is Payment Pending. The dialog "Inspection Approved" shows an Inspection Fee line.
- Click Make Inspection Payment (reads "Preparing..." while busy). The app fires
POST /api/v1/transaction/inspection/initializewithamount,propertyId,inspectionIdand acallbackUrlof/app/inspections/verify?inspectionId=INSPECTION_IDon the current origin. - The browser leaves the app for the Paystack checkout page returned as
authorization_url(same tab). - After checkout Paystack returns to
/app/inspections/verifywith areference(ortrxref) query param. The page shows "Verifying your payment…" and firesGET /api/v1/transaction/inspection/verify/:reference. - If the response's
data.statusissuccess, the page shows Payment Confirmed, "Your inspection fee has been received successfully.", a details box (Reference, Type "Inspection Fee", Status "Paid") and "Your inspection slot is now confirmed. The agent will contact you with final details before the scheduled date." Buttons: View My Inspections and Back to Home (to/app). - Anything else shows Payment Failed, "We could not verify your inspection payment.", and "The payment could not be verified. If you were charged, please contact support with reference: REFERENCE." Buttons: Try Again (back to
/app/inspections?ref=INSPECTION_ID, which reopens the dialog) and Back to Inspections.
Fee shown versus fee sent
The dialog displays the inspection's agentInspectionFee when present and ₦5,000 otherwise, but the request always sends amount: 5000. Unless the backend substitutes the agent's fee, an agent-specific fee is displayed but not charged. Confirm against the backend before relying on either number.
Add the inspection to Google Calendar
The Payment Confirmed page includes a calendar prompt. It fires GET /api/v1/calendar/google/status and renders nothing until that answers.
- Already connected: "Your inspection is being added to your Google Calendar."
- Not connected: "Add this inspection to your Google Calendar so you don't miss it." with Connect Google Calendar.
- The button fires
GET /api/v1/calendar/google/url?returnPath=/app/inspectionsand sends the browser to the returned Google consent URL. If that call fails: toast "Couldn't start Google Calendar connection. Try again." - Google's consent flow returns to
/app/inspections?calendar=connected(toast "Google Calendar connected.") or?calendar=error(toast "Couldn't connect Google Calendar. Please try again."). The param is then removed from the URL.
A disconnect endpoint is defined (DELETE /api/v1/calendar/google) but no screen in this app calls it.
States and edge cases
- Slots panel. Before a date is chosen: "Pick a date on the calendar first" and "No date selected". While loading: a spinner. No slots: "No available slots for this day".
- Inspections loading. "Loading inspections...".
- Inspections empty. "No inspections yet", "Book a tour on any property listing to schedule an inspection." and Browse Properties.
- Inspections error. "Failed to load inspections. Please try again later." with Go Back (to
/app). - Payment start errors (toasts): "Unable to start payment: property details are missing.", "Unable to start payment: user reference is missing." (no user id in
localStorage), "Payment URL not returned. Please try again." and "Failed to initialize payment. Please try again." - Verify page without a reference. Goes straight to Payment Failed with the reference shown as "N/A". Try Again only appears when
inspectionIdis in the URL. - Unknown status. A status outside the table falls back to the Scheduled badge and a generic "Inspection Update" dialog.
- Cancelling. There is no cancel or reschedule action for the tenant in this app.
Copy mismatch in the pending dialog
The Awaiting Approval dialog says "You can pay once the status becomes scheduled", but the payment button is offered while the status is in_progress (badge Payment Pending). Scheduled is the state after payment.
What happens next
- The request goes to the listing's agent or landlord, who approves or declines it in their own dashboard; this page only reflects the resulting status the next time it loads (there is no live update or polling here).
- After a verified payment the inspection is confirmed and, when Google Calendar is connected, the confirmation page says it is being added to the calendar. The calendar write itself happens on the backend.
Property Details
Everything on a listing page, from the photo gallery and agent card to reviews, sharing and the call-to-action states.
Booking and Escrow Payment
Requesting payment for a rental or purchase, booking a short-let stay, paying through escrow or direct payment, tracking the escrow and releasing funds.