Robotaxis: driverless cars from a partner
Built: 2026-11-03. Written for operators and for whoever maintains the code.
Driverless cars are on the road in the Gulf and the US (WeRide and Uber in Abu Dhabi, Baidu Apollo Go in Dubai, Waymo in the US). The partner owns and runs the cars. This platform sells the ride: the rider books it in the usual app and pays the usual way, and the partner's car comes.
Setting it up
- Admin → Fleet Partners → Add partner. The robotaxi company is added as a fleet partner. Tick "verified": earnings settle to a fleet only once it is verified.
- Admin → Providers → Robotaxi partner. Four fields, from the partner:
- the base URL of its dispatch API;
- its API key;
- the webhook signing secret. Give the partner this webhook URL:
<your API>/robotaxi/webhook; - the remote support phone number riders see in the car.
- Admin → Pricing → + Vehicle Type, for example "Robotaxi". Set its fares
as usual, and under Robotaxi choose the partner. The list shows
"driverless ·
" next to the type. - Admin → Zones. Draw the streets the partner is licensed and mapped for, and choose Robotaxi area and the partner. Add as many areas as the partner has.
Until all four steps are done, riders are not offered a robotaxi. Nothing else changes.
What the rider sees
- The robotaxi type appears in the ride list, with a Driverless badge, only when the trip starts and ends inside the partner's robotaxi areas.
- When the rider picks it, a note explains what is different. Cash is replaced by the wallet (or the card, where cards are on). Scheduling, offering a fare, stops, child seats, women drivers and EV-only are hidden: none of them apply to a driverless car.
- The first time, the rider is asked once to agree to ride without a
driver: nobody is at the wheel, the door unlocks with a PIN, remote support
is one tap away, and there are cameras in the car. The agreement is stored
(
users.av_consent_at). - Once a car is assigned, the trip screen shows the car instead of a driver: the plate, the colour and model, the unlock PIN to type on the door screen, and a Call remote support button. There is no call or chat with a driver, no trip recording, no tip and no "raise your fare".
- The PIN disappears once the trip starts. The car moves on the map from the positions the partner sends.
- Pushes say "Your driverless car is on the way" and "Your car is here", in the rider's language.
- If no car is free, the rider is told so at once and offered the other rides.
- After the trip the rider rates "Driverless ·
". The rating counts for the partner in the report.
How a trip runs
The rider books. Instead of offering the ride to drivers, the platform asks the partner for a car. The request carries our ride id, the pickup and drop-off and the unlock PIN.
The partner's webhooks then move the ride along:
Partner event What happens vehicle_assignedThe car is assigned. Its plate, model and colour are shown. vehicle_locationThe car moves on the rider's map and the dispatch map. vehicle_arrived"Your car is here"; the waiting clock starts. trip_startedThe rider unlocked the car: the trip is under way. trip_completedThe trip settles at the distance the partner reports. trip_cancelledBefore pickup: cancelled, no fee. Under way: the trip ends where it stopped and is paid for the distance driven. Events can come twice or out of order. Each event acts once, and a missed step is filled in (
trip_startedwith novehicle_arrivedfirst still works).If the partner accepts a request but gives no car within 3 minutes, the platform cancels it with the partner and tells the rider no car is free.
If the rider or an operator cancels, the partner is told to send the car away.
Each car becomes a "driver" of the partner's fleet the first time it drives a trip. Nobody can log in as that driver, and it is never offered ordinary rides. Because of that, receipts, tax invoices, ratings and the trip history work as for any trip.
Money
A robotaxi trip settles like any other ride: the rider pays the fare, the platform takes its commission for the type, and the rest goes to the partner's fleet wallet (the whole driver share, 100%). The partner is paid out from there like any fleet.
Admin → Reports → Robotaxis, per month and per partner: trips asked for, done (and how many ended early), cancelled, no car found, kilometres driven with riders, fares, the partner's share and the average rating.
The partner's API
A partner whose API has another shape needs a small adapter in
backend/src/robotaxi/av-partner.provider.ts. The contract it implements:
POST {baseUrl}/trips Authorization: Bearer {apiKey}
Idempotency-Key: {our ride id}
{ ref, product, pickup{lat,lng,address}, dropoff{…}, unlockPin, passengerName, callbackUrl }
→ 201 { id, etaSeconds } 409 = no car free
POST {baseUrl}/trips/{id}/cancel { reason }
Webhook → POST {this API}/robotaxi/webhook
x-av-signature: sha256=<hex HMAC-SHA256 of the raw body, keyed with the webhook secret>
{ id, tripId, type, vehicle{id,plate,model,color}, location{lat,lng,heading,speed},
distanceMeters, reason }
A webhook without a valid signature is refused (401). If the partner's API is not set up, refuses, or cannot be reached, the ride ends as "no car available". It is never left waiting.
Code
backend/src/robotaxi/robotaxi.ts: events, signature, the event → step table, unlock PINs, area rules (no I/O).robotaxi.service.ts: hand-off from the offer loop, the webhook, the cars, the rider and operator views.av-partner.provider.ts: the partner API.- Migration
1700000144000-Robotaxi:vehicle_types.av_partner_org_id, zone typeav_area,users.av_consent_at,driver_profiles.av_partner_org_idandav_vehicle_ref,av_trips,av_trip_events. - Hooks in rides:
DispatchOfferService.setHandoffandRidesService.onStatusChange. Rides does not depend on the robotaxi module. - Rider app:
RobotaxiCarCard,src/lib/robotaxi.ts, and the confirm, tracking and rate screens. - Admin: Pricing (partner), Zones (
AvAreaFields), Providers, Reports (RobotaxiCard).
Tested
The partner was a local mock: no real partner API was called. Tested on the iOS simulator in Arabic and the Android emulator in English: booking, the consent sheet, the car on its way, arrived, on trip, completed, the rating, and the no-car screen. Also tested: cancelling (by the rider and by the partner), a breakdown mid-trip, a repeated event, a bad signature, every booking refusal, and a car reused across trips. The settlement was checked in the ledger.
Local and legal checks
Driverless services need permits from the transport authority (Abu Dhabi ITC, Dubai RTA, the state DMV/CPUC in the US). The permits usually limit the areas, the hours and who may ride. For example, minors may need an adult with them, and some programmes start with no airport trips. The robotaxi areas and ride types are where you set these limits. Confirm with the partner and the regulator what your permit allows. The consent text and the camera notice should also be reviewed by your privacy counsel for each market.
The US: a mixed fleet, and the AV trip data (added 2026-11-04)
Riders. US riders see human and driverless rides in one app, as with Waymo on Uber in Austin and Atlanta. Everything above already does this: robotaxi types sit beside human ones, and each type is offered only where its partner may drive.
Partners. A Waymo-, Zoox- or Tesla-style partner connects through the same
dispatch connector (robotaxi/av-partner.provider.ts):
- a trip request;
- webhooks for vehicle assigned, arrived, trip started, trip completed and trip cancelled;
- PIN unlock;
- remote support.
A partner whose API differs gets its own provider behind the same interface. The rest of the flow does not change.
AV trip data for regulators. Admin → Regulator reports has a kind,
Driverless (AV) trips (av_trips), with one row per trip requested from an
AV partner. The columns are:
| Column | Notes |
|---|---|
ref |
|
av_partner |
|
vehicle |
The car's plate |
partner_trip_id |
|
av_status |
|
av_failure |
|
requested_at |
Market time |
pickup_at |
Market time |
dropoff_at |
Market time |
pickup_lat, pickup_lng |
Rounded to 3 decimals, about 100 m |
dropoff_lat, dropoff_lng |
Rounded to 3 decimals, about 100 m |
miles |
|
fare |
|
currency |
|
wheelchair |
|
trip_status |
|
cancelled_by |
|
incidents |
The SOS and complaint count |
incident_kinds |
There are no rider names or addresses. Like the other reports, it can be previewed or filed with a SHA-256 checksum.
Confirm locally.
- California: the CPUC's AV deployment programme asks for quarterly trip, accessibility and incident data in its own templates. The DMV asks for collision reports (OL 316) within 10 days, from the AV operator, who here is the partner. Map this file to the current templates.
- Other states: they have their own AV reporting, or none.
Tested. End to end, av-report-e2e (5 checks), on the 7 robotaxi trips in
the test data:
- the report is offered;
- there is one row per trip, with the partner and rounded places, and no rider names;
- it can be filed with a checksum;
- a rider is refused.