US: regulatory fees by zone and time of day
Built: 2026-11-04. Written for US operators and whoever maintains the code.
US cities and states put their own surcharges on ride trips. For example:
- New York State's congestion surcharge, on trips into, out of or within Manhattan south of 96th Street;
- Chicago's downtown surcharge, on weekdays from 6 a.m. to 10 p.m.;
- per-trip taxes;
- a fund or state fee charged as a percentage of the fare.
The rider pays each one, and the platform remits it to the authority. Regulators and riders both expect every surcharge to appear on the receipt under its own name.
The amounts and areas change, sometimes yearly. Copy each one from the authority's current rules and confirm it with counsel.
Setting a fee (Admin → Configuration → Regulatory fees)
| Field | |
|---|---|
| Name | Riders see it on the quote and the receipt, e.g. "NYC Congestion Surcharge" |
| Paid to | The authority it is remitted to |
| Region | The whole market, or a region zone (draw the area in Zones first) |
| Applies to trips | Starting in, ending in, starting or ending in, or starting and ending in the region |
| Days and hours | Market time. A window that ends before it starts (22:00–04:00) runs past midnight and belongs to the day it started, so a Friday-night fee covers Saturday at 2 a.m. |
| Charged as | A flat amount per trip, or a percentage of the fare. The percentage is taken on the fare before these fees and before tolls |
| Ride types | Optional. When none are picked, the fee applies to every type |
| In force from / until | Optional dates |
Creating, changing, removing and exporting fees are audit-logged under
regulatory_fee.*.
Removing a fee that trips have already carried only switches it off. This keeps it on their receipts and in the remittance report. A fee no trip has carried is deleted.
How a fee moves through a trip
- Quote. Each matching fee becomes its own line in
breakdown.regulatoryFees, andbreakdown.regulatoryMinorholds the total.- The fees are added on top of everything else, including the minimum fare, so a minimum fare never swallows them.
- Negotiated (bidding) fares and fixed metro-feeder fares carry no fees.
- Booking. The ride stores
regulatory_fee_minorand theregulatory_feeslines. The frozen quote also keepsregulatoryMinor, so a metered fare adds the same amount back on top at settlement. - Settlement. The fees are a pass-through:
- they carry no commission and no fleet share;
- they are credited to the ledger account
regulatory_fee_payable; - they sit outside the tax invoice, as a reimbursement, the same way tolls do;
- if a promotion leaves less charged than the pass-through items, the items are trimmed in this order: tolls first, then the government fee, then the fuel line and the airport fees.
- Receipts.
- The rider's receipt lists every fee by name ("Includes NYC Congestion Surcharge").
- The driver's receipt still adds up to what the rider paid, with the fees inside "Other fees".
Remittance
The What to remit section shows, for any month:
- what riders paid per authority and fee;
- how many trips that covers, counting completed trips only.
Download CSV gives one row per trip and fee. Use it to file and pay each authority.
Code
backend/src/pricing/regulatory-fees.ts: validation, the time windows andfeesFor(no I/O).backend/src/pricing/regulatory-fees.service.ts:- the rules, cached for 60 seconds;
forTrip, whichPricingService.estimatecalls;- the admin endpoints, the report and the CSV.
- Changes to the existing settlement code:
geo/airport-rules.ts:PassThrough.regulatoryMinor;rides/dispatch.service.ts: reads the stored fees at settlement;wallet.service:regulatoryPayableMinor;pricing/fare-finalize.ts:regulatoryMinor.
- Migration
1700000189000-RegulatoryFeesadds:- the
regulatory_feestable; rides.regulatory_fee_minorandrides.regulatory_fees;- the enum value
regulatory_fee_payable.
- the
- Rider app:
app/(app)/trip/[id].tsxshows the lines;src/lib/receipt-total.tscounts them in the total. Admin:app/(dashboard)/regulatory-fees/page.tsx.