Fintech & Finance Operations// definition

Three-way matching: the documents, and the fields the join runs on

In short

Three-way matching in accounts payable compares what you agreed to buy, what arrived, and what you are billed for. Mechanically it is a join across a purchase order, a goods receipt and an invoice, keyed on PO number, PO line, item, unit of measure, quantity, unit price, currency and tax treatment. Every field in that key is somewhere the join can fail.

Key takeaways

  • The 3 documents assert different things: a commitment, a delivery, a claim for money.
  • It is a join, and it needs a key all 3 documents carry at the same granularity.
  • 8 fields do the work: PO number, PO line, item, unit of measure, quantity, price, currency, tax.
  • Two-way drops the receipt, four-way adds an inspection. Same join, fewer or more assertions.
  • The supplier never agreed to your key. That is why matching is structurally brittle.

Three-way matching compares three documents that each assert something different: the purchase order says you committed to a quantity at a price, the goods receipt says a quantity arrived, and the invoice says money is owed. A match means all three agree, line by line, on the same key.

Calling it a comparison undersells it. This is a join, and a join needs a key all three carry, spelled the same way, at the same granularity. Most of what an AP team experiences as a matching problem is that key missing on one side, ambiguous on another, or held at a different level on the third.

DocumentWritten byWhat it assertsFields it brings
Purchase orderYour buyerYou committed to a quantity at a pricePO number, PO line, item code, quantity, unit of measure, price, currency
Goods receiptYour warehouse or acceptorA quantity arrived on a datePO number, PO line, received quantity, unit of measure, date
Supplier invoiceThe supplier's billing systemAn amount is owed, on termsInvoice number, supplier identity, PO reference if quoted, quantity, price, tax
The 3 documents, and what each contributes to the join

Only one of the three is written outside your control, and it is the one carrying the money.

The 8 fields the key is built from

  • PO number. The only field linking an invoice to a commitment, and one the supplier copies by hand. Without it the join has no left-hand side, which is where a non-PO invoice leaves you.
  • PO line. Decides whether the match is line-level or header-level. Suppliers quote the number far more often than the line, so engines fall back to comparing totals.
  • Item code. Yours, theirs, or free text. Resolving a supplier part number is an alias lookup living in the vendor master record.
  • Unit of measure. Ordered in cases, billed in each: both quantities correct, neither comparable. That is unit-of-measure drift.
  • Quantity. Compared cumulatively against prior receipts and prior billings, so 3 deliveries and 2 invoices need running totals on both sides.
  • Unit price. Compared within an allowed variance, itself a rule object — see what an engine may wave through.
  • Currency. A number without a currency is not a price. EUR on the invoice against GBP on the PO is a different quantity, not a variance.
  • Tax treatment. Tax is calculated, not matched. Compare net and evaluate tax separately, or a reverse-charge line fails against a gross-billed one.

One line, joined: where the tuples stop lining up

PO 4501182, line 20: 40 cases of item ITM-4471, 12 units to a case, at 18.40 the case. The warehouse receives 40 cases. The supplier bills 480 units at 1.55. Every number is right; the join fails anyway.

FieldPO lineGoods receiptInvoice lineVerdict
PO reference4501182 / 204501182 / 204501182, no lineHeader-level only
ItemITM-4471ITM-44714471-C "Widget, 12pk"Needs an alias table
Unit of measureCSCSEAFails without a conversion factor
Quantity4040480Equal after conversion, not before
Unit price18.40not carried1.55Equal per unit, not per line
Line net736.00not carried744.00Out by 8.00, rounding 1.5333 to 1.55
PO line, goods receipt and invoice line, field by field

Four failures, none of them anybody's mistake. The supplier billed in the unit it ships in, rounded to the precision its system holds, and quoted the reference a human typed. Each needs a rule.

A matching engine does not fail because someone was careless. It fails because two companies described the same delivery in their own vocabularies, and nothing in between translated.

Dropping the receipt, or adding an inspection

  • Two-way match. PO against invoice, no receipt in the join. Right where nothing physical arrives — a consultancy day, a licence renewal — so the only assertions are the commitment and the claim.
  • Four-way match. Adds an inspection or acceptance record, so the join proves goods arrived and were accepted. Right where those are separate events: a certificate of analysis, an engineer's sign-off.

These are not tiers of rigour. Each drops or adds an assertion, and the right one depends on which assertions exist in your process. A three-way match where nobody posts receipts produces a permanent exception queue, not a stronger control.

The supplier never agreed to your key

A matched invoice is not a paid one either. Matching establishes the obligation; the payment clock runs from a date chosen separately, as invoice date, received date or approval date argues. That gap between a recognised obligation and money that has moved reappears as ledger balance against available balance.

Matching is therefore a data-modelling problem before a model problem, which is how we scope AI agents and automation in finance: an agent acting on a key nobody validated is the failure in putting AI agents into production. The rest of invoice to pay: capture, matching and approvals covers either side of the join, and our finance operations work is mostly making the join possible before making it automatic.

Frequently asked questions

Short answers to the follow-ups this page tends to raise.

What is three-way matching in accounts payable?

It is the control that clears a supplier invoice only when a purchase order, a goods receipt and the invoice agree. The PO asserts what was committed, the receipt what arrived, the invoice what is owed. The match joins all three on the same line and checks quantity and price agree within an allowed variance; anything else becomes an exception rather than a payment.

What documents are needed for a three-way match?

Three: the purchase order, the goods receipt or service acceptance record, and the supplier invoice. All three must reference the same PO line, or the match degrades into a header-level comparison of totals that cannot say which line the variance came from.

What is the difference between two-way and three-way matching?

Two-way compares the invoice against the purchase order only; three-way adds the goods receipt. The distinction is not strictness but which assertions exist. Two-way suits services and licences where no receipt is posted. Without one you are confirming you agreed to spend the money, not that you received anything.

  • accounts payable
  • invoice matching
  • purchase orders
  • AP automation
// shipped work

The work behind this page

Builds from our portfolio that this page draws on.

Working on something in this space?

Tell us where you are in a sentence or two. We'll tell you honestly whether we're the right team, and what a sensible first slice of the work looks like.

Start the conversation