RideKit
Docs/Reference/US: rideshare insurance periods and claims

US: rideshare insurance periods and claims

Built: 2026-11-03. Written for US operators, their insurers' claims desks, and whoever maintains the code.

US rideshare insurance is written in three periods, set by state TNC laws:

Period The driver is…
0 offline: their personal cover applies
1 online, waiting for a ride
2 on the way to a pickup (accepted until the passenger is in)
3 with a passenger

The insurer prices cover on period 1 hours and period 2 and 3 miles. After a crash, it asks which period the driver was in. RideKit already logged every time a driver went online, offline or onto a trip (driver_status_events), and answered "which period at this instant". This adds the claim file and the monthly report.

For a claim (Admin → Drivers → a driver → Hours)

  • Period at a moment: unchanged.

  • Insurance claim: periods over a window (up to 31 days, entered in the market's time zone). It shows each stretch in period 1, 2 or 3 with:

    • its start and end;
    • its minutes;
    • the miles driven in it;
    • the ride and the car's plate.

    It also shows totals.

  • Claim CSV downloads the same as driver,phone,period,start,end,minutes,miles,ride,plate. The download is audited, because it carries the driver's name and phone.

Miles come from the ride's GPS track (a fix every 8 seconds while heading to the pickup and on the trip). When a ride has no track, period 3 falls back to the trip's metres.

For the insurer (Admin → Reports → Rideshare insurance report)

Pick dates, up to 31 days, and get each driver's:

  • period 1 hours;
  • period 2 miles;
  • period 3 miles;
  • trips.

A total row sits on top, and the table can be exported to CSV. This is what an insurer such as James River or Progressive bills against.

A dispatch fix found here

The E2E showed a ride's history saying "back to requested" 15 seconds after a dispatcher assigned it, while the driver was already at the pickup. That made the driver look off the trip for insurance.

The cause: the automatic offer loop kept running after a dispatcher assignment, and its timer logged a lapse. Now:

  • an assignment ends the loop;
  • a timer on a ride that is no longer requested ends quietly;
  • a ride whose history never says it ended stops counting where the driver's next ride begins. A stacked ride accepted mid-trip is left alone.

Tested end to end

  • API (insurance-e2e.mjs, 13 checks): a real ride with 8 GPS fixes gave the timeline 1 → 2 → 3 → 1 → 0, with no gaps. It showed 0.25 mi in period 2 and 1.2 mi in period 3, matching the track, plus the ride and plate. The totals, the CSV, the audit, permissions, the 31-day limit and the fleet report all checked out.
  • Admin in Chrome (admin-insurance.mjs): the claim timeline on the driver page, the CSV download, and the insurer report on Reports.
  • Specs: insurance-periods.spec.ts covers the timeline, clipping, back to back rides, miles, and open stretches. offer-timeout-taken.spec.ts covers the dispatch fix.

For the code

What Where
Timeline and miles backend/src/drivers/driver-hours.ts (periodTimeline, trackMiles, tripSegments)
Claim, CSV, fleet report backend/src/drivers/driver-hours.service.ts (insurancePeriods, insurancePeriodsCsv, insuranceReport)
API GET /admin/drivers/:id/insurance-periods, …/insurance-periods.csv, GET /admin/insurance-periods
Dispatch fix backend/src/rides/dispatch-offer.service.ts (onTimeout), dispatcher.service.ts (assignDriver)
Admin components/fleet/DriverHoursCard.tsx, components/reports/InsuranceReportCard.tsx, 15 languages

Check before launch. Confirm the report's layout and the period definitions with your insurer. Some insurers count period 2 from the moment the request is accepted, and others from dispatch.

source: docs/us-insurance-periods.md (ships identically in the product zip)