Freight Invoice Auditor
Match every carrier invoice to the shipment and the rate you actually agreed to, compute the variance, and flag overcharges - so your team stops paying freight bills that don't match the deal.
A private internal tool that auto-matches carrier invoices to shipments and contracts, computes the variance, flags over/undercharges against your tolerance, and routes each one to an auditor who approves pay-as-billed, short-pay, or dispute - then exports an AP-ready file and a dispute log.
Before you start
- A free Supabase account
- A free Vercel account
- A free Resend account
- A CSV export of carrier invoices, your contracted/quoted rates, and your shipment data
The problem this kills
Carriers bill you what their system says - not what you negotiated. A fuel surcharge calculated on the wrong basis, an accessorial that was never authorized, a rate that quietly drifted off the contract, a re-weigh that doesn't match the BOL. Each one is small. Across hundreds of loads a month, the leakage is real money, and nobody on the AP team has time to hand-check every line against the rate sheet.
So the bills get paid. The overcharges stick. And the only audit that happens is the one a third-party freight bill auditor does months later - for a cut of whatever they claw back.
This tool does that audit in-house, on every invoice, before it's paid.
What you'll build
A private web app where you drop in three things - carrier invoices, your contracted/quoted rates, and your shipment data - and the tool automatically matches each invoice to its shipment and the rate you actually agreed to. It recomputes what the bill should be (base rate, fuel surcharge on the correct basis, plus only the accessorials that apply), compares it to what you were billed, and flags the variance against the tolerance you set.
Then a human auditor reviews each flagged invoice and chooses a disposition: pay as billed, short-pay to the correct amount, or dispute. Only approved items flow out - as an AP-ready payment file and a running dispute log you can send back to the carrier.
What's inside the Implementation Plan
The plan is a complete, paste-and-go runbook for an AI coding agent (Claude Code). It opens by interviewing you about your business - your carriers, how your invoices and rate sheets are actually laid out, your accessorial and fuel-surcharge rules, your match keys, and your tolerance thresholds - so the tool is built around your freight, not a generic template. It reads a short spec back to you for a thumbs-up before it builds anything.
From there it walks you, prompt by ready-to-copy prompt, through:
- Setting up the database, login, and per-organization data isolation
- Importing the three CSVs and normalizing carrier-specific column names
- The matching engine (invoice -> shipment -> contracted rate) with a duplicate guard keyed on invoice number + PRO
- The variance calculator with configurable tolerance, accessorial matching, and fuel-surcharge basis checks
- The auditor review queue with the pay / short-pay / dispute approval gate
- The AP-ready export and the dispute log
- A no-API fallback so it works today from CSVs alone, with a clean CSV export in the exact columns your AP system expects
The governance it includes (this is the point)
This isn't a script that quietly rewrites your payables. Every build includes:
- Login so only your team can open the tool.
- Row-level security so each organization only ever sees its own invoices and rates.
- A complete audit trail - who reviewed what, what they decided, and when.
- A hard human-in-the-loop gate - the AI computes the variance and recommends a disposition, but nothing reaches AP until an auditor approves it.
- Duplicate guards so the same invoice (invoice number + PRO) can never be audited or paid twice.
Who it's for
Freight audit and AP teams, and logistics finance leads who own carrier spend - anyone who suspects they're paying bills that don't match the deal and wants the audit done before the check goes out, not months later for a contingency fee.
You've got this. Paste the first prompt and let the interview tailor the rest.