RideKit
Docs/Reference/US: regulatory fees by zone and time of day

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

  1. Quote. Each matching fee becomes its own line in breakdown.regulatoryFees, and breakdown.regulatoryMinor holds 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.
  2. Booking. The ride stores regulatory_fee_minor and the regulatory_fees lines. The frozen quote also keeps regulatoryMinor, so a metered fare adds the same amount back on top at settlement.
  3. 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.
  4. 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 and feesFor (no I/O).
  • backend/src/pricing/regulatory-fees.service.ts:
    • the rules, cached for 60 seconds;
    • forTrip, which PricingService.estimate calls;
    • 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-RegulatoryFees adds:
    • the regulatory_fees table;
    • rides.regulatory_fee_minor and rides.regulatory_fees;
    • the enum value regulatory_fee_payable.
  • Rider app: app/(app)/trip/[id].tsx shows the lines; src/lib/receipt-total.ts counts them in the total. Admin: app/(dashboard)/regulatory-fees/page.tsx.
source: docs/us-regulatory-fees.md (ships identically in the product zip)