How to match invoices to purchase orders
7 min read
Invoice-to-PO matching checks that a supplier invoice agrees with the purchase order it bills against: same supplier, same items, same quantities, same prices. Two-way matching compares invoice to PO; three-way matching adds the goods-received note. It is the control that stops a company paying for things it did not order or did not receive.
What PO matching actually checks
A purchase order is a promise to buy; an invoice is a request to be paid. Matching them answers one question — is this invoice asking for exactly what we agreed to? — across four dimensions: the supplier, the items, the quantities, and the unit prices. A fifth, the totals, is a consequence of the other four and is the least useful thing to check on its own.
The reason totals are a weak check is that they agree by accident more often than you would expect. An invoice that bills ten units at $12 instead of twelve units at $10 has the right total and the wrong everything else. Header-level matching catches the invoice with no PO; only line-level matching catches the invoice with the wrong lines.
Two-way versus three-way matching
Two-way matching compares the invoice against the purchase order. It confirms you agreed to buy this, at this price. It does not confirm you received it, which is why it is usually reserved for services, subscriptions, and low-value goods where the cost of a receiving step outweighs the risk.
Three-way matching adds the goods-received note — the delivery note, packing slip, or warehouse receipt that records what physically arrived. Now the invoice has to agree with both what was ordered and what was received. A supplier that ships eight and bills ten is caught here and nowhere else. It is the standard for physical goods, and most audit frameworks expect it above a materiality threshold.
Some teams talk about four-way matching, adding an inspection or quality-acceptance record. It is the same idea with one more document, and the same mechanics apply.
Why manual matching breaks
The purchase order is structured — it came out of your own system. The invoice is not. It arrived as a PDF from the supplier's system, in the supplier's layout, with the supplier's part numbers and the supplier's description of each item. Before any comparison can happen, someone has to read that PDF and translate it into the same shape as the PO. In most accounts-payable teams that translation is a person with two windows open.
That is where the errors get in. The comparison itself is not hard; a spreadsheet can do it. The transcription is hard, because it is repetitive, the layouts differ per supplier, and a wrong quantity looks exactly like a right one. The matching failure most companies experience is not a failure of matching logic. It is a failure of data entry upstream of it.
- Supplier part numbers differ from internal SKUs, so line pairing needs a lookup table nobody maintains.
- Descriptions differ in wording — "Blue widget 10pk" against "WIDGET-BLU x10" — so exact-text matching fails on items that are the same.
- Unit of measure and pack size change the arithmetic: 1 case of 12 versus 12 units.
- Partial deliveries and split invoices mean one PO maps to several invoices and the match is many-to-one.
- Freight, surcharges and taxes appear on the invoice but not on the PO, and need to be classified as acceptable differences rather than mismatches.
Tolerances: deciding what counts as a mismatch
No real-world match is exact. Prices are quoted before a currency moves; suppliers round; freight is estimated. A matching process that stops every invoice with a one-cent difference will be switched off within a month. The fix is a tolerance policy: a rule, agreed in advance, for how much variance is acceptable per dimension before the invoice is held.
Typical policies allow a small percentage or absolute variance on unit price, zero variance on quantity for physical goods, and a separate allowance for freight and surcharge lines. What matters is that the rule is written down and applied by the system, not decided by whoever is matching that day. The invoices inside tolerance flow through; the ones outside it stop and go to a person.
How to automate it, step by step
Automation does not start with matching software. It starts with getting both documents into the same structured shape, so that the comparison is a query rather than a read.
- Define one field schema for order documents: PO number, supplier, line SKU, description, quantity, unit price, line amount, total. Use it for POs, invoices and delivery notes alike.
- Extract every incoming invoice into that schema. This is the step most teams skip, and it is the step that makes everything downstream possible.
- Normalise supplier part numbers to your SKUs with a lookup against your item master; where no mapping exists, pair lines by semantic similarity of the description rather than exact text.
- Verify the invoice against itself first: does unit price times quantity equal the line amount, and do the lines sum to the total? Arithmetic errors are the cheapest to catch and the most embarrassing to pay.
- Match header fields on the PO number, then match lines within the matched PO. Apply your tolerance policy per dimension.
- Route only the exceptions to a reviewer, with the invoice, the PO and the specific disagreement in front of them. Post the matches straight to the ERP.
- Keep an audit trail of who approved what and when. Auditors ask for it; so does the supplier when they dispute a short payment.
Where Tavnit fits
Tavnit does the extraction and the shaping. Purchase orders, invoices and delivery notes arrive by email or API and are extracted into the same typed fields, whatever the supplier's layout. A lookup Cleaner maps supplier part numbers to your SKUs; a formula Cleaner checks line arithmetic; a condition flags anything outside your tolerance.
For line-level matching, a Matcher takes the PO run as the benchmark and pairs each invoice line to it — semantically, with an LLM tiebreaker for borderline pairs — laying quantity and unit price side by side and listing unmatched lines as warnings. Flagged invoices pause for a named reviewer with an append-only audit trail; the rest go to your ERP by API or webhook.
Common questions
- What is the difference between two-way and three-way matching?
- Two-way matching compares the invoice to the purchase order — did we agree to buy this at this price? Three-way matching also compares against the goods-received note — did it actually arrive? Three-way is the standard for physical goods; two-way is common for services and low-value purchases.
- Can PO matching be fully automated?
- The comparison can be. The part that resists automation is getting the supplier's invoice PDF into the same structured shape as your PO, because every supplier's layout, part numbers and descriptions differ. Once extraction is automated, matching is a query, and only the exceptions need a human.
- What tolerance should I set for PO matching?
- There is no universal number. Most policies allow a small percentage or absolute variance on unit price, zero variance on quantity for physical goods, and treat freight and surcharges as separate acceptable lines. The important thing is that the rule is written down and applied consistently by the system.
More guides
Try it on one document
Build a flow, send a real document through it, and see what comes back. Free credits to start.
Start free