Marketplace Platform · Mobility

A Managed Vehicle Rental Marketplace

A managed car-rental marketplace for the UAE where the operator sits in the middle of every deal — brokering bookings, collecting the money, and settling with rental companies through a derived, double-sided wallet that's correct to the dirham.

Built by
HashCode – FZE
Type
Full-stack B2B2C marketplace platform, built and owned in-house
Industry
Vehicle rental / mobility

B2B2C

Marketplace model

Double-sided

Wallet & ledger

Exact decimal

Money math

Two-way

Settlements

Overview

It's a car-rental marketplace for the UAE. Rental companies list their fleets on it, customers rent through it, and the operator who runs the marketplace sits in the middle — curating listings, brokering each booking, collecting the money, taking a commission, and paying the companies out.

That middle position is the whole product. A booking doesn't go straight from customer to rental company; it goes through the operator, who controls what the company sees and when. The operator holds the customer relationship, holds the cash, and runs the accounts for both sides. The platform is what makes that possible: a public marketplace on the front, and a full brokerage and settlement system behind it.

We built and own the entire stack — the public site, the admin and company portals, the pricing and commission engine, the wallet and payout ledger, the contract and inspection pipeline, and the messaging automation that runs bookings. One codebase, built in-house, with no third-party marketplace platform underneath it.

The Challenge

A managed marketplace is much harder than a listings site. The operator isn't just introducing two parties and stepping back — it's the counterparty to both. It collects the customer's payment, owes the rental company its share, keeps its own commission, and has to prove every number to both sides on demand. And the money doesn't move cleanly: sometimes the operator collects, sometimes the company collects directly and then owes the operator its cut. Each payment is split between company earnings, commission, service fee, and tax — while some charges (a fine, an extra day, a non-refundable fee) belong entirely to one party and must never be counted against the other. Deposits owe nothing. Renewals reopen a booking and re-split it. Get any of it wrong and a company is underpaid or double-charged, and trust in the marketplace is gone. So the platform had to:

  • Put the operator in control of every booking, enforced in the data model — not by convention.
  • Keep a ledger correct to the dirham through splits, renewals, pass-throughs, and two-way settlements.
  • Track who actually collected each payment, and net what's owed in both directions.
  • Carry a real rental all the way: verified customers, signed agreements, documented handover, fines and disputes.

The Solution

We built it in clean layers, keeping the business logic away from any one framework or vendor so nothing was painted into a corner. Here's how the pieces fit together.

Operator-mediated bookings

Every booking flows through the operator before it reaches the rental company — and a company can't see a booking until the operator explicitly hands it over. That's enforced in the data model, not by convention: the booking is simply invisible to the company until it's transferred. It lets the operator vet, price, and control each deal instead of just passing leads through.

A double-sided wallet and ledger

Each company's wallet is computed, not stored — the platform derives the full ledger on every read from the underlying bookings and payments. It tracks gross received, service fees, commission, tax, earnings, and money owed in each direction, and crucially who collected the cash: when a company collected directly, the commission it owes back is surfaced as an explicit line item with the reason attached. It nets payouts against settlements so nobody is ever double-charged.

A pricing and commission engine

Prices are built from a tiered commission model with a service fee and optional tax, all in exact decimal arithmetic. The operator can override pricing per company and per car, and promotional offers lock their price breakdown at booking time so the numbers survive after the offer expires. Projected splits are kept separate from realised ones, so partial payments and renewals prorate correctly instead of corrupting the original booking's math.

Payments with provenance

Every payment records what it was for, who collected it, who it's owed to, and whether it's confirmed or still pending. Pass-through charges route to the right party without being booked as owed between them, pending payments stay out of every total until they clear, and refunds, deposit releases, and partial payments are all first-class. Provider events are handled idempotently, so a retried webhook never double-counts.

Settlements in both directions

The platform models both flows a managed marketplace actually has: operator-to-company payouts to a verified bank account, and company-to-operator settlements when a company collected cash it owes back. Both are reviewed by the operator before they close.

Contracts, KYC, and an audit trail

Customers are verified from their ID and licence before a booking confirms. Rental agreements are generated as PDFs and signed through time-limited links. Handover and return are captured as inspection records with signatures, GPS location, mileage, photos, and immutable audit logs — a paper trail built for disputes and fines — and violations, blacklisting, and post-rental charges each have their own workflow.

Booking automation over messaging

An automated agent runs the enquiry-to-confirmation conversation over WhatsApp — confirming availability with the company, collecting the customer's documents, and closing the booking — so the operations team isn't doing it by hand in a chat window. It feeds verified bookings straight into the same brokerage and ledger.

Technology

Technology stack used to build the platform
LayerTechnology
FrontendNext.js (React, TypeScript), Tailwind CSS, subdomain-separated public site and portals
Backend APIPython, FastAPI, async SQLAlchemy, REST
DatabasePostgreSQL, with versioned schema migrations
Money & ledgerExact decimal arithmetic; a derived, double-sided wallet computed per request
PaymentsThird-party payments provider, handled with idempotent webhooks
DocumentsServer-side PDF generation for contracts, with tokenised e-signing
Object storageS3-compatible storage for documents, images, and inspection photos
AuthenticationJWT with email one-time-password login for customers and companies
Booking automationA compiled agent running a fixed booking state machine over a business messaging provider
InfrastructureDocker / Docker Compose; the test suite must pass before the backend starts

The system is a modular monolith — separate API areas for the public marketplace, customer accounts, companies, payments, admin, and operations over one PostgreSQL database — with application-level multi-tenancy scoping every company to its own data, and the public site isolated from the admin and company portals by subdomain.

Results & Impact

Operator-mediated

every booking brokered through one controlled pipeline

Two-way

settlements: payouts out, company-collected cash owed back

Exact decimal

money split across commission, fees, tax and pass-throughs

Audit-grade

KYC, e-signed contracts and inspection trails for disputes

Why It Matters

Anyone can build a listings site. The difficulty here was the money. Because the operator is the counterparty to both sides, the platform has to collect, split, and settle every payment and be ready to justify each figure to a rental company on demand. That meant the wallet couldn't be a balance someone edits by hand; it had to be a genuine derived ledger that nets both directions and remembers who collected what. We designed that money model, baked the brokerage rules into the data so they can't be sidestepped, and built the rest of what a real rental needs around it: pricing, contracts, KYC, inspections, and payouts. Getting that right is the whole job.

  • Marketplace
  • B2B2C
  • Fintech ledger
  • Payments & settlement
  • FastAPI
  • PostgreSQL
  • KYC
  • AI booking automation

Build something like this with HashCode

AI platforms, automation, and custom software — designed, built, and operated end to end. Tell us about your project.