Skip to content

Invoice OCR that checks the numbers it reads

ChatYourData reads supplier invoices from PDFs, scans and phone photos and returns the number, dates, parties, line items and totals as structured data. Before the data reaches your books, it checks that the lines add up and the totals match. Upload an invoice to see the result.

Northfield Fasteners Ltd
14 Mill Lane, Leeds LS1 4AB, United Kingdom

Invoice NF-20418

Invoice date: 12 November 2026
Due date: 12 December 2026

Bill to: Example Workshop Inc.
220 Lake Street, Madison, WI 53703, USA

DescriptionQtyUnit priceAmount
Hex bolt M8 x 40, box of 1001218.50222.00
Lock washer M8, box of 500421.0084.00
Freight164.0064.00

Net: 370.00 GBP
VAT 0%: 0.00 GBP
Total due: 370.00 GBP

Foreign invoice

A fictional document with the real result from our model. Select a field to see where it was read from. PDF, PNG, JPG or WEBP up to 10 MB, first three pages, five documents without an account. Files you do not move to an account are deleted after 7 days.

What data the invoice OCR extracts

Every value comes with the page and the piece of text it was read from, so a reviewer can confirm it at a glance.

FieldWhat it containsAutomatic check
Invoice numberThe number given by the supplier, whatever the label says (Invoice No., Rechnungsnummer, Facture n°)
Invoice date and due dateWritten as YYYY-MM-DD regardless of the format on the documentDue date is not before the invoice date
SellerCompany name, address, country code and VAT IDVAT ID format for EU countries
BuyerYour company as the supplier wrote it, with its VAT ID
Net, tax and totalAmounts from the invoice summary as plain numbers, with the currency codeNet plus tax equals the total
Line itemsDescription, quantity, unit price and value of each lineLines add up to the net amount
Bank detailsIBAN and SWIFT codeIBAN checksum

What happens when an invoice does not add up

The invoice goes to a review queue with a plain description of the problem, for example a total that differs from net plus tax. The reviewer sees the document next to the extracted fields and corrects or approves it.

Corrected invoices then serve as examples for similar documents in your company, so a supplier with an unusual layout needs fewer corrections over time.

How to get invoice data into your accounting system

Approved invoices can be downloaded as a CSV file with one row per invoice. Line items are kept in one column of that file as JSON, so if your system needs each line separately, the API is the better route.

Through the API you send a file and receive JSON, either in the same request or through a webhook when the result is ready.

Several invoices in one scan

A stack of paper invoices often ends up as a single PDF. ChatYourData splits such a file by page ranges, recognizes the type of each document and reads every invoice separately.

Invoice OCR API

One request with a file returns the invoice as JSON. The confidence value drops when a field fails a check, which makes it easy to decide which invoices a person should see.

Request
curl https://api.chatyourdata.pl/v1/extract \
  -H "X-Api-Key: $CYD_KEY" \
  -F [email protected] \
  -F document_type=foreign_invoice \
  -F wait=30
Response (shortened)
{
  "data": {
    "id": "ext_812",
    "status": "done",
    "document_type": "foreign_invoice",
    "fields": {
      "invoice_number": { "value": "INV-2026-0042", "confidence": 0.95,
                          "page": 1, "source": "invoice no. inv-2026-0042" },
      "gross_amount":   { "value": 1000.0, "confidence": 0.95,
                          "page": 1, "source": "total due 1,000.00 eur" }
    },
    "issues": [],
    "usage": { "pages": 1 }
  }
}

Questions about Invoice OCR

Can it read scanned invoices and phone photos?

Yes. PDFs with a text layer are read directly, and scans and photos are read by a vision model that looks at the whole page. Blurred or cropped values get lower confidence and the invoice is marked for review.

Which languages does the invoice OCR support?

Invoices can be in any language, for example English, German or French. The output format stays the same: ISO dates, currency and country codes, and amounts as numbers.

Do I need to create a template for each supplier?

No. The fields are described once for the document type and the model finds them in any layout. You can add hints or extra fields to your own document type.

How is a page counted?

A one-page invoice uses one page of your monthly allowance. Failed extractions are not counted.

Try invoice OCR on your own suppliers

The trial lasts 14 days and includes 200 pages, with no card required. That is enough to check the invoices you receive every month.