Three-way matching in accounts payable: PO, receipt and invoice, and how the match really works

Three-Way Matching in Accounts Payable: How It Works, With GR/IR and SAP

How three-way matching in accounts payable works: the three documents, the GR/IR accounting, partial deliveries, real tolerance policies and SAP.

Quick answer

Three-way matching in accounts payable compares three documents before an invoice is paid: the purchase order (what you agreed to buy), the goods receipt (what actually arrived) and the supplier invoice (what you are asked to pay). The invoice price is checked against the PO and the invoice quantity against the receipt. If they agree within your tolerance, the invoice can be paid; if not, it is blocked as an exception. In the books, the goods receipt and the invoice meet in a GR/IR clearing account, which should net to zero once both are posted.

Why listen to us: ECIT Digital reads supplier invoices for finance teams every day, including every line item a match depends on. Our AI reads every invoice, our people check what the AI is unsure about, and we guarantee 99.8% accuracy on the data we deliver.

Last month I ordered 12 eggs online. The delivery note said 12, the box held 10, and the invoice charged me for 12 "premium" eggs at a price I had never agreed to [I paid it, obviously, I was hungry].

My partner, who reads receipts for fun, found all three problems in about a minute. That is three-way matching: comparing what you ordered, what arrived and what you were billed, before the money leaves. This guide covers how it works in practice, the accounting behind it, and how SAP handles it [the eggs will be back, sadly].

Three-way matching is one of the core accounts payable internal controls.

The three documents at a glance

Every three-way match uses the same three documents, though every ERP gives them a slightly different name [because software vendors are paid by the synonym].

DocumentWhat it provesWho creates itAlso called
Purchase orderWhat you agreed to buy, at what pricePurchasing or the requesterPO, order
Goods receiptWhat actually arrived, and how manyReceiving or the requesterReceiving report, product receipt, item receipt, GRN
Supplier invoiceWhat you are asked to payThe supplierVendor invoice, vendor bill

Back in 1995, the US GAO listed "matching the types and quantities of goods received with those of the purchase order or contract and preventing duplicate and early payments" among the essential internal controls.

How three-way matching works in accounts payable

The PO sets the price, the receipt sets the quantity, and the invoice has to agree with both. Microsoft's documentation for Dynamics 365 puts it neatly: "Match the price information on the invoice to the price information on the purchase order. Also match the quantity information on the invoice to the quantity information on the product receipts" [my egg invoice failed both, which takes talent].

Three-way matching in accounts payable: the purchase order, goods receipt and invoice, and the accounting entry each one creates
Three documents, two accounting entries: the receipt and the invoice meet in the GR/IR account.

NetSuite describes the same check from the approval side: its workflow "validates the details of a vendor bill against the details of its corresponding purchase order and item receipt". Different words, same three documents [the eggs do not care what you call them]. For the difference between 2-way, 3-way and 4-way matching, see our guide to invoice matching.

Three-way match accounting: the GR/IR clearing account

Most guides stop at the documents, but the match also lives in your books. In SAP and many other ERPs it runs through a GR/IR clearing account, short for goods received, invoice received [the accounting equivalent of a waiting room].

SAP defines it as "An account which is posted to in the following cases: Goods received which have not yet been invoiced; Invoices for goods which have not yet been received". When goods arrive, the value goes to inventory or expense and the offset sits in GR/IR. SAP adds that "The GR/IR clearing account is cleared when the invoice is posted to the vendor account."

EventDebitCredit
Purchase order raisedNo entryNo entry
Goods receipt: 80 units at $5.00Inventory or expense $400GR/IR $400
Invoice: 80 units at $5.00GR/IR $400Accounts payable $400
Balance left on GR/IRZero: matched

Fictional numbers, to show the method.

Anything left on GR/IR at month end is a story waiting to be told. A credit balance means goods arrived but no invoice yet, which is your received-not-invoiced accrual. A debit balance means you were invoiced for goods that never arrived [which is exactly what happened with my two missing eggs].

When the numbers do not agree: a worked calculation

Here is the egg problem at business scale. The PO is for 100 units at $5.00 each. Only 80 arrive, and the invoice charges 100 units at $5.10 [the supplier also felt "premium" that day].

CheckPOReceiptInvoiceResult
Quantity10080100Fails: billed for 20 units not received ($102)
Unit price$5.00n/a$5.10Fails: 2% over the PO price
What you should pay now80 units at $5.00$400, once the supplier corrects the invoice

Fictional numbers, to show the method.

The quantity variance goes back to the supplier or receiving: either more goods are coming, or the invoice is wrong. The price variance goes to the buyer, who either confirms a price change on the PO or asks the supplier for a credit note.

Partial deliveries and split invoices

Real deliveries rarely arrive in one neat box. A good three-way match handles several receipts and several invoices against one PO line, and keeps track of what is still open [unlike my egg supplier, who is still "on the way" with two eggs].

SituationHow to match it
One PO, two deliveries, one invoiceMatch the invoice to both receipts combined
One PO, two deliveries, two invoicesMatch each invoice to its own receipt
Invoice arrives before the goodsHold the invoice until the receipt is posted
Fewer goods than ordered, no more comingClose the PO line so the open quantity does not get invoiced later
More goods than orderedTreat as an exception; accept or return the extra

Matching each invoice line to a specific receipt line keeps this clean. SAP calls that goods-receipt-based invoice verification: "each invoice item can then be matched up uniquely with the goods receipt item."

Tolerances and thresholds: real policies

Few teams three-way match everything, and nobody should block an invoice over a few cents. Two public university policies show how organizations write these rules down [universities publish their AP policies, which is more than most of us publish].

OrganizationWhen three-way matching appliesTolerance
UT DallasItems costing $5,000 or moreNot part of this rule
Texas TechPurchase order payments greater than $10,000The lesser of 10 percent or $200

Write your own version on one page: which invoices need a receipt, how big a difference is allowed, and who can approve an exception. Then check every quarter how often people override it.

Three-way match in SAP

In classic SAP ERP, the three-way match happens in Logistics Invoice Verification, where invoices are entered with transaction MIRO. The PO, the goods receipt and the invoice meet there, and GR-based invoice verification ties each invoice line to a receipt line [SAP has a transaction code for everything, including, probably, eggs].

SAP featureWhat it does in the match
MIROEnter the incoming invoice against the PO
GR-based invoice verificationMatches each invoice item to a goods receipt item; set per PO item
GR/IR clearing accountHolds the value between goods receipt and invoice
Tolerance limitsDecide how big a price or quantity variance can be before a block
Service entry sheetPlays the role of the goods receipt for services

When a variance is too big, SAP does not reject the invoice, it parks the payment: "You can post the invoice in the system, but it is automatically blocked for payment if an upper tolerance limit is exceeded." One detail catches teams out: "If the invoice is blocked, all the items are blocked, even if the invoice only displays variances in one item."

For services, the accepted service entry sheet takes the place of the goods receipt. SAP says "Entering and accepting services in external services management is the same as a goods receipt posting when procuring materials." Quotes here come from SAP's classic ERP documentation; S/4HANA screens look different, but the logic is the same [the logic has aged better than the screens].

When three-way matching is not worth it

Three-way matching costs time: someone has to post every receipt, on time, for every delivery. For some spend, that effort buys almost nothing [like counting the eggs in a single-egg box].

SpendUsually enough
Physical goods above your thresholdThree-way match
Low-value goods below the thresholdTwo-way match to the PO
ServicesTwo-way match, or a service sign-off as the receipt
Recurring bills (rent, software)Check against the contract, then approve
Goods that must pass inspectionFour-way match

A common reason three-way matches fail is not the supplier at all, but a missing or late goods receipt. If receiving does not post receipts the day goods arrive, every match turns into an exception [receiving is the hero nobody ever thanks]. If you buy physical goods at volume, our purchase order matching and processing use case shows how the data side can run.

What we see in the field

We read the invoice side of a lot of matches, so we see where they break before anyone else does [like a referee who only watches the replays].

ECIT Digital validation view: invoice header and line data validated by a person, 99.8% accuracy
Our validation view: fields the AI is unsure about get checked by a person before delivery.
  • The match runs on line items. Header totals cannot tell you which line is short; quantities and unit prices per line can.
  • A misread line is a fake mismatch. If 80 is read as 30, the match fails for no real reason and someone wastes an afternoon on it.
  • People check what the AI is unsure about. Every field our AI is not confident about goes to someone on our team before delivery, which is how the 99.8% accuracy guarantee holds.
  • Clients never touch the document. Clean header and line data lands in their ERP or AP tool, ready for the match.
"Construction invoices are complex and highly variable and ECIT provided a flexible and extensible data extraction model that worked wonderfully." - Terence Pua, CEO, Hinges AI

Curious how many of your invoices could match without a person? Run the free invoice health check: it scores your invoice process in about 3 minutes and estimates what you could save, based on your own numbers.

Line items, read right

Invoices in, clean data out, 99.8% accuracy guaranteed

Our AI reads every invoice, header and line items, our team checks what the AI is unsure about, and validated data goes straight into your ERP or AP tool. You pay per document, with no license.

As for the eggs: I now count the box on the doorstep, check the price against the order, and only then pay [my partner says this is the most attractive thing I have ever done]. Order, receipt, invoice. Three documents, one habit, no missing eggs.

Sondre Bratlandsmo

November 23, 2026

Frequently asked questions

What is three-way matching in accounts payable?

Three-way matching in accounts payable compares the purchase order, the goods receipt and the supplier invoice before the invoice is paid. The invoice price is checked against the PO price and the invoice quantity against the quantity received. If they agree within the agreed tolerance, the invoice can be approved for payment; if not, it is held as an exception.

What is the difference between 2-way and 3-way matching?

A 2-way match compares the invoice with the purchase order only. A 3-way match adds the goods receipt, so you also confirm that what you are paying for actually arrived. 2-way matching is common for services and low-value spend; 3-way matching is used for physical goods above a set value.

What is the GR/IR account in three-way matching?

The GR/IR (goods received, invoice received) clearing account holds the value between the goods receipt and the invoice. At goods receipt, inventory or expense is debited and GR/IR is credited. When the matching invoice is posted, GR/IR is debited and accounts payable is credited. A balance left on GR/IR shows goods received but not invoiced, or invoices for goods not yet received.

How does three-way matching work in SAP?

In SAP ERP, invoices are entered against the purchase order in Logistics Invoice Verification with transaction MIRO. Goods-receipt-based invoice verification matches each invoice item to a goods receipt item, and the GR/IR clearing account links the two postings. If a price or quantity variance exceeds the tolerance limits, SAP posts the invoice but blocks it for payment.

How do you handle partial deliveries in a three-way match?

Match each invoice to the receipts it covers. If one invoice covers two deliveries, match it to both receipts combined; if each delivery has its own invoice, match them one to one. Hold an invoice that arrives before the goods until the receipt is posted, and close the PO line if no more goods are coming so the open quantity is not invoiced later.

What tolerance should a three-way match use?

Tolerances are set by each organization, often as a percentage, a fixed amount, or the lower of the two. For example, Texas Tech's published policy uses the lesser of 10 percent or $200. Set limits that fit your spend, write them down, and review how often people override them.

Relevant articles

Invoice Coding: What GL Coding Is, Who Does It, and How to Fix Mistakes

Best practises
Sondre Bratlandsmo

Touchless Invoice Processing: What It Means, How to Measure It, and What Stays Human

Best practises
Sondre Bratlandsmo

E-Invoicing in Europe: Country Mandates and What They Mean for UK Businesses

UK E-Invoicing
Sondre Bratlandsmo