Citizens-only drivers (Saudi Arabia)
Built: 2026-11-02. For the operator, and for whoever maintains the code.
In Saudi Arabia, app-based passenger transport is for Saudi nationals. The Transport General Authority licenses a captain only on a Saudi National ID, never on an Iqama (residence permit). The number itself tells the two apart:
| Card | Number |
|---|---|
| Saudi National ID (citizen) | 10 digits, starting with 1 |
| Iqama (resident) | 10 digits, starting with 2 |
The last digit is a Luhn check digit, so a mistyped number is caught too.
What happens
- At signup. The driver uploads their national ID with its number. The
app checks the number as it is typed. An Iqama shows "This is an Iqama
number. Only Saudi nationals can drive in Saudi Arabia" and the upload
button stays off. The server refuses the same number if it is sent anyway
(
nationality_ineligible), before the file is stored. - At review (Admin → Drivers → KYC). The national ID row shows
"1XXXXXXXXX · Citizen". Edit details lets the reviewer correct the
number. A holder that contradicts the number is refused. Approve is
refused:
- when no number is recorded;
- when the holder is a resident;
- when the same number is already approved for another driver. This rule applies in every market: one person, one driver account.
- Verification. A driver whose national ID is not a citizen's is not verified ("Citizens only: …"). If an Iqama is recorded on an approved ID, the approval is withdrawn.
Setting (Admin → Markets → KYC → Who can drive)
Citizens only ships ON for Saudi Arabia and OFF everywhere else. Other markets can turn it on. Their ID numbers do not say who holds them, so the reviewer records Citizen or Resident from the card.
The ID number is kept only where the rule is on. India's Aadhaar number, for example, is never asked for or stored.
Legal check needed. The citizens-only rule and its exceptions (for example, licensed transport companies) should be confirmed with local counsel and the TGA before launch.
For developers
| Piece | Where |
|---|---|
| Rule, ID check, details | backend/src/drivers/driver-eligibility.ts (eligibilityConfigFor, saudiIdHolder, validateNationalIdDetails, eligibilityProblem) |
| Gate, approval, upload check | DriverKycService (eligibility, driverIdDetails, assertIdApprovable, evaluate) |
| Market config | config.eligibility, validated in MarketsService.update |
| Driver upload | POST /driver/documents takes idNumber with national_id |
| Driver app | app/(app)/upload-doc.tsx, src/lib/national-id.ts |
| Admin | components/markets/DriverEligibilityCard.tsx, components/training/CheckDetailsModal.tsx (national_id fields) |
| Tests | drivers/driver-eligibility.spec.ts, driver src/lib/national-id.test.ts |
Tested end to end with the install switched to Saudi Arabia:
- Android emulator: the driver's Iqama number is refused inline. A
National ID number and photo upload as "Pending review", with
{idNumber, holder: citizen}stored. - iOS simulator: the field and hint render, and the Iqama error shows in Arabic.
- Chrome, admin:
- a number and holder that disagree are refused;
- approval is refused for a resident and for a number held by another driver;
- a citizen's ID is approved;
- the "Who can drive" card shows on the SA market.