Contents
Key takeaways
- A furnished rental marketplace: nightly, long-stay or LokaPass (4-hour package) bookings.
- Card (Stripe) and mobile money (Wave) payments, with currencies and payment methods configured per country.
- Host payouts held during a dispute window matched to the stay length, and blocked when an incident is open.
- Trust written into the rules: identity verification, relocation, penalty points, trust score, reviews.
- Server-rendered PHP website and Expo iOS / Android apps on the same API.
MyLoka is a furnished rental platform in Côte d'Ivoire: hotels, serviced residences, apartments. Guests find a place, book by the night, for a few hours or for a long stay, and pay online. Hosts publish listings, manage their calendar, reply to guests and track their earnings. I led the full-stack development of the project: the website, the iOS and Android apps, the shared API and the back office.
One product, two audiences
MyLoka serves two users with opposite expectations. Guests want to find a place fast, understand the price and pay safely. Hosts want to fill their property, get paid on time and be protected from abuse. The whole product is built around that balance.
- For guests: search by city with filters (price, bedrooms, more than 70 amenities), listing page with gallery, map and reviews, booking, payment, messaging with the host, favourites, stay history.
- For hosts: guided listing creation with drafts, availability calendar, booking requests to accept or decline, dashboard (earnings, views, conversion), messaging, payout requests.
- For the team: an admin back office and scheduled tasks that keep the platform running without manual work.

The booking journey
- The guest searches a city and narrows results with filters. Results load in batches as the page scrolls.
- They pick a plan: nightly, long stay, or LokaPass, a 4-hour package designed for short needs.
- They select dates in the calendar. The API checks availability against booked dates, dates blocked by the host and preparation days between two stays.
- The “Confirm and pay” page shows the summary, the cancellation policy and the price breakdown, then the payment.
- The host receives the request, accepts or declines it, and both sides can talk in the inbox.
Each listing picks a cancellation policy: flexible, moderate or strict, with thresholds at 7 days and 24 hours before check-in. LokaPass has its own rule, with a full refund up to 2 hours before the slot. These rules live in a single configuration file shared by the website and the app.



Payments, the hard core
In West Africa, cards are not enough. MyLoka accepts cards through Stripe's Payment Element and mobile money through Wave, with Moneroo as an additional gateway. A per-country configuration sets the currency (CFA franc XOF or XAF, Ugandan shilling) and the available payment methods. Prices can also be displayed in euros or dollars, with exchange rates cached for 24 hours and a fallback value if the rate service does not respond.
Payment is only the beginning. The money must then reach the host, but not too early:
- Dispute window: after check-in, the guest has time to report a problem. It is 3 hours for one night, 6 hours up to 3 nights, 12 hours up to 7 nights, 24 hours beyond.
- Caution for new hosts: an extra 6-hour hold until they have 3 bookings.
- Payout held automatically when an incident or a bank dispute is open on the booking.
- Wave payouts: hosts see their available balance and pending amounts, and request a transfer from their area.
Stripe and Wave webhooks are verified by signature before any processing. Stripe bank disputes are recorded only once, even if the notification arrives several times. This kind of detail is what prevents paying a host twice or losing track of a refund.
Trust, written into the rules
A rental marketplace lives on trust. Several mechanisms protect it, all present in the code:
- Identity verification with Didit, tracked by webhook and by a regular check task.
- Check-in photos and incident reports with photos, a reply from the other party and escalation to mediation.
- Relocation: if a host cancels, the platform suggests up to 3 listings in the same city priced between 70% and 130% of the original stay, with a 10% promo code valid for 30 days.
- Penalty points for hosts who cancel (warning, fine, demotion, suspension, ban), with an exemption for force majeure.
- Force majeure events declared per country or city, which identify the affected bookings.
- Trust score recomputed by a scheduled task for hosts and guests (booking volume, cancellation rate, warnings).
- Reviews with rating, star breakdown, up to 3 photos and a host reply.

A fair ranking of listings
Sorting by rating is not enough: the same properties would always stay on top and new ones would never get a chance. The order of results therefore combines several signals:
- average rating and number of reviews;
- listing quality: number of photos and amenities, description, host response rate;
- click rate relative to views;
- a boost for recent listings, decreasing over 14 days;
- a rebalancing based on impressions over the last 7 days, so that visibility rotates;
- a small random factor, and a bonus for promoted listings (paid boost).
Two interfaces, one API
The website is written in PHP with Tailwind CSS and rendered server-side for search engines: Open Graph tags, schema.org structured data and dynamic sitemaps. The iOS and Android apps are built with Expo and React Native. Both use the same PHP API and the same MySQL database, so a business rule exists in only one place.
A few concrete choices on the app side:
- sign-in with a code sent by email, with Google or with Apple, with a token valid for 30 days;
- native payment with the Stripe SDK, maps with react-native-maps;
- push notifications through Expo's service, and emails that respect each user's preferences (messages and bookings are always notified);
- inbox refreshed every 10 seconds, on the website and in the app;
- interface in French and English;
- over-the-air (OTA) updates and error reporting with Sentry.
On the server, rate limits protect sensitive endpoints: SMS sending, sign-in codes, social sign-in, payment. Uploaded images are converted to WebP and resized according to their use (avatar, listing, review, document). The referral programme gives the referrer a share of their referrals' bookings for 6 months, with self-referral blocked. Hosts can also export their bookings in iCal format to add them to their calendar.

What runs in the background
A booking platform never stops. One scheduled script groups all background tasks, which can run together or one by one: cleanup of expired sign-in codes, closing of finished stays, end of expired promotions, payout release, trust score computation, force majeure checks, identity verification follow-up, sign-up reminders, listing integrity checks and a daily digest.
What this project shows
MyLoka brings together almost every difficulty of a marketplace: two audiences, money flowing between them, local payment methods, disputes, trust to build and two interfaces to keep aligned. The project is live at myloka.co and its apps are available on the App Store and Google Play. The architecture is ready for new countries: currencies, payment methods and rules are already configured per country.
Do you have a booking, rental or marketplace project with online payment? Get in touch to talk about it. You can also see all the screenshots of the project.
Frequently asked questions
Can a booking platform accept mobile money?
Yes. MyLoka accepts Wave in addition to cards through Stripe. Payment notifications are verified by signature before being processed, and payment methods are enabled country by country.
How do you avoid paying a host before a possible dispute?
Each booking has a date from which the payout becomes possible, computed from the stay length. A scheduled task releases funds only if no incident or bank dispute is open.
Does the logic have to be built twice for the website and the app?
No. On MyLoka, the website and the iOS and Android apps use the same API and the same database. A business rule, such as a cancellation policy, is written only once.