SHARED

Freight Invoice OCR and Charge-Line Extraction

Extract every freight charge as a separate, reviewable line instead of relying on a grand total. Capture invoice, B/L, booking and container references, route, equipment, rates, taxes and accessorial charges for audit and matching.

Freight invoices combine shipment references with base rates, fuel, terminal and accessorial charges. GainingDocx keeps every charge separate so an apparently correct grand total cannot hide an unsupported fee.

Invoice evidence is matched to the PO and B/L, sea waybill or receipt using exact commercial references, container IDs, parties, currency and configured amount tolerances.

No sign-up for your first document · 15–30 seconds per page

Short answer

What a freight invoice parser extracts

Every charge as its own line — base freight, fuel, terminal handling, documentation, security, accessorials, demurrage and taxes — each with its description, basis, rate, quantity and amount. Plus the shipment references, route, equipment and rated weights, so each charge can be traced back to the quotation and the transport document that should support it.

  • Charge lines separated, never a bundled total
  • Basis and rate captured alongside the amount
  • References linked to B/L, booking and container
  • Arithmetic recomputed against the printed total

Freight Invoice Fields and Charges Extracted

  • Invoice number, dates, carrier, bill-to party and currency
  • B/L, booking, PO, shipment and container references
  • Origin, destination, service and equipment details
  • Charge code, description, quantity, rate, tax and amount per line
  • Subtotal, tax, adjustments and amount due

Freight Charge Audit and Matching Checks

Computed in code — the AI never does the math.

  • Charge-line arithmetic and printed subtotal reconciliation
  • Currency and amount-tolerance enforcement
  • B/L, booking, PO and container reference matching
  • Unsupported or contradictory accessorials routed to review

How to Extract Freight Invoice Data

  1. 01

    Upload or photograph the document — pages are compressed on your device.

  2. 02

    Review the extracted fields; deterministic checks flag anything suspicious.

  3. 03

    Export to Excel, CSV or JSON, or generate the counterpart document.

Why the total is the least useful number on the invoice

Freight invoices are audited line by line or not at all. A grand total tells you nothing about whether a fuel surcharge was applied at the contracted percentage, whether a terminal handling charge was billed per container or per shipment, or whether an accessorial appeared that nobody agreed to.

The recurring pattern in freight billing errors is not fabrication — it is charges that are individually plausible and collectively unauthorised. A documentation fee billed twice under two names, a chassis charge on a lane where the carrier provides chassis, a currency adjustment applied to a rate already quoted in local currency. None of those are visible in a total.

  • Base freight rated on the wrong weight, volume or revenue tons
  • Fuel or bunker surcharge applied at a percentage other than the contracted one
  • Terminal handling billed per container where the contract says per shipment
  • The same service billed twice under two different descriptions
  • Accessorials for services that were never rendered or never agreed
  • Currency adjustment applied where the rate was already in local currency
  • Demurrage or detention billed on the wrong day count or with retroactive tiers
  • Taxes computed on a base that should have excluded certain charges

Field inventory

Freight invoice extraction
GroupFields
InvoiceInvoice number and date, due date, currency, payment terms, issuing carrier or forwarder
ReferencesB/L or air waybill number, booking number, container numbers, shipment or file reference, customer reference
Route and serviceOrigin, destination, port of loading and discharge, vessel or flight, service level, movement type
Rated basisChargeable weight, gross weight, volume, revenue tons, container count, equipment type
Charge linesDescription, charge code, basis, rate, quantity, currency and amount for each line
Taxes and totalsTax lines with their base and rate, subtotal, total, and any prepaid or collect split
PaymentBank details, remittance reference, and any credit or adjustment lines

Checks applied

  • Each charge line recomputed as rate × quantity and compared with the printed amount
  • Charge lines summed against the printed subtotal, and subtotal plus tax against the invoice total
  • Currency consistency checked across lines, taxes and totals
  • Container numbers validated under ISO 6346 and matched against the transport document
  • B/L, booking and container references matched to an existing shipment record
  • Duplicate charge descriptions within one invoice flagged
  • Rated weight or volume compared against the transport document and packing list where available
  • Ports matched against the bundled UN/LOCODE dataset

Match the charge to the evidence, not to expectation

The productive audit question is not 'does this charge look reasonable' but 'which document supports it'. A terminal handling charge is supported by the transport document; a demurrage charge by the gate records and the tariff; a customs disbursement by the entry. Charges with no supporting evidence are the ones worth challenging.

Running an audit

  1. 1Extract the invoice and confirm the shipment references match a shipment you actually have.
  2. 2Check the rated basis first — chargeable weight, revenue tons or container count — because an error there scales through every rated line.
  3. 3Compare each charge line against the quotation or service contract, and mark anything not provided for.
  4. 4Check for duplicate charges under different descriptions, which is the single most common finding.
  5. 5Verify surcharge percentages against the contracted basis rather than against the amount that looks familiar.
  6. 6Reconcile demurrage and detention lines against your own day count and the tariff tiers.
  7. 7Confirm the tax base excludes any charge it should exclude under local rules.
  8. 8Raise disputed lines in writing with the specific line identified and the evidence attached, inside the applicable window.

Matching the invoice to the shipment

A freight invoice is only auditable against the shipment it bills. Grouping it with the Bill of Lading, booking confirmation, arrival notice and packing list gives every charge line something to be checked against — and makes the invoice that references a shipment you have no record of immediately visible.

  • Bill of Lading: route, equipment, packages and weights that rated lines depend on
  • Booking confirmation: the rate and terms agreed, and the equipment committed
  • Arrival notice: destination charges that were disclosed before arrival
  • Packing list: the volume and weight the freight was rated on
  • Quotation or service contract: the authority for every line on the invoice

Try it on your own document — free, no sign-up

Start parsing

Freight Invoice OCR FAQ

What teams ask most often before putting freight invoice parser output into a customs filing, a payment run or a downstream system.

What data is extracted from a freight invoice?

Invoice header details, all shipment references including B/L, booking and container numbers, the route and service, the rated basis such as chargeable weight or revenue tons, and every charge line separately with its description, code, basis, rate, quantity, currency and amount — plus tax lines and totals.

Why does it matter that charges are separated rather than totalled?

Because a total cannot be audited. Freight billing errors are rarely fabrications; they are individually plausible charges that were never agreed — a fee billed twice under two names, a surcharge at the wrong percentage, an accessorial for a service not rendered. None of those are visible without line-level detail.

Can it detect duplicate charges?

Duplicate descriptions within one invoice are flagged directly. Duplicates across invoices — the same service billed on both the origin and destination invoice — are found by grouping the invoices to the same shipment, which is where that pattern actually lives.

Does it check the arithmetic?

Yes, in deterministic code. Each line is recomputed as rate × quantity, the lines are summed against the printed subtotal, and subtotal plus tax is compared with the invoice total. Currency consistency is checked across all of them, since a single line in a different currency silently distorts the total.

Can it verify a charge against my contract rate?

It extracts the rate, basis and quantity as separate fields so the comparison against your quotation or service contract is direct rather than requiring the figures to be dug out of a PDF. The contract itself remains the authority — the parser presents the evidence in a form you can check against it.

Does it handle demurrage and detention lines?

Yes, as charge lines with their basis and day counts where those are printed. Auditing them properly requires the tariff, the gate records and the day-count convention, which is what the demurrage calculator is for. Extraction gives you the billed figures in a form you can check that calculation against.

Can it match the invoice to the Bill of Lading?

Yes, by B/L number, booking reference and container numbers, with container check digits recomputed. Where the invoice references a shipment already in the workspace it is linked automatically, and rated weights and volumes are compared against the transport document and packing list.

What about invoices in multiple currencies?

Currency is captured per line as well as per invoice, and inconsistency is flagged. Multi-currency freight invoices are common where local charges are billed in local currency against a USD ocean rate, and any conversion rate printed on the invoice is captured as a field rather than applied silently.

Does it work with forwarder invoices as well as carrier invoices?

Yes. Forwarder invoices are typically the more complex of the two, bundling carrier charges with the forwarder's own services and disbursements. The same line-level model applies, and disbursement lines that pass through a third party's charge are captured with whatever supporting reference is printed.

How quickly should a freight invoice be audited?

Inside whatever dispute window applies, which is often short and sometimes contractual. In the United States, demurrage and detention billing rules give the billed party a defined period to seek mitigation. The practical discipline is to audit on receipt rather than at payment, because a dispute raised after the window closes is usually payable regardless of merit.

Can I export the charge lines for analysis?

Yes. Export produces the charge lines as rows in Excel or CSV, and structured JSON where the array needs to survive into a downstream system. Charge-line data across many invoices is what makes lane-level cost analysis possible at all, which is a second use for the same extraction.

Does it tell me whether a charge is legitimate?

No, and it should not. It tells you what was billed, on what basis, at what rate, and which document — if any — supports it. Whether a charge is authorised is a question about your contract and what actually happened, and that judgement stays with you. The parser removes the data-gathering, not the decision.

Does it merge all charges into one freight amount?

No. Base freight, fuel, terminal and accessorial charges remain separate rows for auditability.

Can I verify LCL weight-or-measure billing?

Yes. Use the LCL W/M calculator with CBM and gross weight from the shipment, then compare the estimate with the parsed charge lines.

Related tools, templates and guides