Toll Reconciliation
HostMetrics tracks toll charges across your fleet and matches them to specific trips for accurate cost accounting. This feature supports multiple toll providers and both manual CSV import and automatic sync.Supported Toll Providers
| Provider | Region | Import Method |
|---|---|---|
| NTTA | Texas (Dallas/Fort Worth) | CSV import, automatic sync |
| EZPass | Northeast US | CSV import |
| SunPass | Florida | CSV import |
Connecting Toll Accounts
On the Data Sources page, users can add toll account credentials. These are stored in thetoll_accounts table and used for automatic sync.
Import Methods
CSV Import
CSV Import
Download a transaction report from your toll provider’s website, then upload it in HostMetrics. The system parses provider-specific CSV formats, extracts transaction date, amount, plaza/location, and tag ID.
Automatic Sync (Lambda)
Automatic Sync (Lambda)
For supported providers (NTTA), an AWS Lambda function periodically scrapes toll transactions using saved credentials. The sync runs on a schedule and can also be triggered manually. See Toll Sync Architecture for technical details.
Trip Matching
Toll transactions are matched to trips by comparing:- Date — The toll transaction date falls within the trip’s start and end dates
- Vehicle — The toll tag is associated with a specific vehicle
Reconciliation Table
TheTollReconciliationTable component shows all toll transactions with their match status:
| Status | Meaning |
|---|---|
| Matched | Toll is linked to a specific trip and vehicle |
| Unmatched | No trip found for the toll date and vehicle |
| Manual | User manually assigned the toll to a trip |
Cost Analysis
The Reports page includes toll-specific analytics:- Summary cards (
TollSummaryCards) — Total toll costs, average per trip, matched percentage - Trend chart (
TollTrendChart) — Monthly toll spending over time - By-vehicle breakdown (
TollsByVehicleChart) — Which vehicles incur the most tolls - Reconciliation report — Full matched/unmatched transaction list with CSV export
Key Files
| File | Purpose |
|---|---|
src/lib/db/toll-transactions.ts | Import, parse, and query toll data |
src/lib/db/toll-accounts.ts | Manage toll provider credentials |
src/app/api/tolls/sync/route.ts | API route for manual sync trigger |
src/components/reports/TollsTab.tsx | Toll analysis tab in Reports |
src/components/reports/TollReconciliationTable.tsx | Match status table |