Automating Invoice Processing With Three-Way Matching
AI extraction speeds invoice intake, but only three-way matching stops fraud and overpayments.
Automation handles the intake and routing problem. And while that's genuinely useful, it's not the whole solution. The core functions are real: ingesting invoices from wherever they land (email, EDI, portals, PDFs), extracting relevant data using OCR and AI, classifying the invoice, routing it for approval, and posting it to the ERP. Modern AI-driven tools go further than older OCR by learning supplier-specific formats over time, flagging anomalies, predicting routing, and improving as exceptions get resolved.
The headline metric everyone tracks is straight-through processing (STP): the share of invoices that go from receipt to payment without a human touching them. Per Ardent Partners' State of ePayables 2025, the industry average sits around 25%, while high-performing teams reach 60 to 80%. Those numbers are worth celebrating, and they're also a reminder that even best-in-class teams still need humans in the loop for a meaningful chunk of invoices.
More importantly, extracting and routing invoice data faster does not verify that the invoice reflects what was actually ordered and received. A fraudulent invoice moves through a fast pipeline just as quickly as a legitimate one. Automation is like a very efficient mail carrier — it delivers everything in the bin without checking whether the letters are real. Catching that requires a different control entirely, which is where three-way matching comes in.

How Three-Way Matching Works
Three-way matching is exactly what it sounds like. You take three documents and check that they agree with each other.
Purchase order (PO): what was authorized, at what price, in what quantity
Goods receipt (GR): what actually arrived and was logged in the warehouse system
Supplier invoice: what the vendor says you owe them
All three have to align on quantity, unit price, and terms before payment is approved. Any discrepancy routes to a human reviewer. Two-way matching only compares the PO and the invoice — workable for services or low-cost items, but it has no idea whether goods actually showed up.
Tolerance thresholds keep matching from becoming a bottleneck. A small rounding difference doesn't block payment, but a significant quantity discrepancy does. Calibrating those thresholds well is genuinely tricky. What three-way matching catches in practice:
Billing errors: quantity billed doesn't match quantity received
Price drift: unit price on the invoice differs from what the PO authorized
Duplicate invoices: same PO referenced twice
Phantom invoices: invoice references a PO that doesn't exist or was never receipted
The fraud angle is serious. A fraudulent invoice can't reach payment without a corresponding, legitimate PO and goods receipt already in the system. Both Google and Facebook issued multimillion-dollar payments on fake invoices before controls like this were tightened. Three-way matching catches this at the point of payment, not after the wire has already gone out.
Why Integration Creates a Closed Loop

Neither piece works well on its own. Without integration, three-way matching becomes a manual bottleneck — your AP team is still pulling POs and goods receipts by hand, and all the speed gained from automated extraction disappears. Without matching, automation leaves errors and fraud moving through the pipeline at the same speed as legitimate invoices.
When the two are actually integrated:
Invoice arrives and data is extracted automatically
Extracted data is immediately compared against PO and receipt data already in the system
Clean match passes straight through to payment
Exception routes to the right reviewer with context already attached
That last point matters more than people initially expect. A well-built system surfaces the PO, the receipt, and the invoice side by side for the reviewer, with the specific problem highlighted. Resolution takes minutes instead of hours of document hunting.
The financial return is direct. Faster, cleaner matching means invoices are approved days sooner, which means early-payment discounts are actually captured. Duplicates are another payoff: without systematic matching, duplicates occur in roughly 2% of manually processed invoices. On tens of millions in annual payables, that's hundreds of thousands in potential overpayments. Matching at the PO level prevents it structurally rather than catching it in a spot audit after the fact.
Where the System Breaks Down

The failure modes here are predictable and still catch teams off guard constantly.
PO coverage gaps. Three-way matching only works for PO-backed invoices. Non-PO invoices — facilities, subscriptions, professional services, anything procured informally — require separate workflows. Most organizations underestimate what share of their volume falls outside PO coverage until they go live and the exception queue fills up faster than anyone planned.
Data quality upstream. Matching is only as good as the data in the PO and receipt. If procurement logs partial receipts late or creates POs retroactively after the invoice arrives, the matching system generates false exceptions on perfectly legitimate invoices. This is a procurement culture problem as much as a technology problem.
Tolerance misconfiguration. Thresholds set too tight create an exception flood that overwhelms AP staff. Set too loose, real discrepancies slip through. This needs careful calibration upfront and revisiting as the business changes.
System fragmentation. Procurement data lives in one system. Inventory and receiving lives in another. AP lives in a third. Without reliable data flow between them, automated matching requires custom integration work that becomes a maintenance liability. Despite roughly 75% of AP departments using some form of AI or automation, 66% of respondents still manually key invoices into their ERP — a figure that actually increased year over year, per Factura.ai 2025. Automation is frequently being layered on top of fragmented systems rather than replacing the fragmented parts.
Supplier data inconsistency. Invoice numbers, PO reference formats, and line-item descriptions vary wildly across suppliers. AI extraction needs sufficient training data per supplier type to match reliably at the line level. Without it, the system flags exceptions that a human has to sort out manually — which is the thing you were trying to avoid.
What Finance Teams Must Get Right
A few things have to be true before the technology can do its job.
PO discipline first. Automated three-way matching requires that procurement actually creates POs before goods are ordered. If your culture allows verbal orders, informal approvals, or retroactive POs, the matching system generates exceptions on legitimate invoices constantly. There's no software setting that fixes it.
Receipt recording timeliness. Goods receipt data must be logged at or near the time of delivery. If warehouse teams log GRs days after delivery, the matching system looks broken even when it isn't. The technology gets blamed for a people and process gap.
Supplier onboarding. Suppliers who submit invoices through portals or EDI generate far fewer extraction errors than those sending unstructured PDF email attachments. The upfront effort to onboard suppliers into structured submission formats pays off quickly and repeatedly.
Exception workflow design. Who reviews a price discrepancy? Who handles a missing PO reference? Who owns a quantity mismatch at the edge of tolerance? These routing rules need to be defined before go-live, not discovered two weeks in via a backed-up queue.
KPIs to track from day one:
Straight-through processing rate
Exception rate, broken down by exception type
Average days to payment
Early-payment discount capture rate
Duplicate invoice catch rate
Tolerance thresholds are a living configuration, not a one-time setup. Define who owns them and how often they get reviewed.
What Engineering Teams Need to Know
A working three-way matching system requires live, reliable data from at least three source systems: the ERP (for POs and GL), the warehouse or receiving system (for goods receipts), and the invoice capture layer. These are almost never the same vendor and were frequently never meant to talk to each other.
Integration points that must be covered:
PO sync: When a PO is created or amended, the matching system needs to see the updated version immediately. Stale PO data causes false exceptions, which cause reviewer fatigue, which causes people to approve exceptions without actually reviewing them.
Receipt events: Goods receipt confirmation needs to trigger a match update in near-real time. Nightly batch updates introduce lag that creates holds on legitimate invoices.
Invoice ingestion: The extraction layer needs to post structured invoice data (vendor ID, PO reference, line items, amounts) to the matching engine in a consistent schema, regardless of what format the invoice arrived in.
ERP write-back: Approved invoices need to post to the GL automatically. Exceptions need to create workflow tasks in the approver's system of record.
Data layer things that bite teams:
Field mapping. PO line item IDs rarely match invoice line item descriptions without a normalization step. Budget more time for this than you think.
Currency and tax handling. Multi-entity or international deployments introduce exchange rate and tax code fields that must be included in the match schema from the start. Retrofitting them later is messy.
Idempotency. Invoice ingestion pipelines must handle duplicate submissions at the API layer. Catching duplicates in the matching logic is too late.
Building direct API integrations to each system (NetSuite, SAP, Coupa, and others) is technically feasible but creates a maintenance surface that compounds over time — each vendor updates their API on their own schedule, and deprecations break matching workflows silently. Pre-built, managed connectors reduce both initial build time and ongoing maintenance burden. For teams building AP automation into a product, the long-tail connector problem is the persistent challenge. Managed integration infrastructure that handles auth and keeps connectors current lets engineering focus on matching logic and exception UX — where the actual product differentiation lives.
How the AP Market Is Evolving
The AP automation market stood at $3.07 billion in 2023 and is projected to reach $7.1 billion by 2030 at a 12.5% CAGR. The AI-driven invoice processing segment is growing faster, projected to go from $2.8 billion in 2024 to $47.1 billion by 2034.
What that second number signals is that the extraction and classification layer is commoditizing. AI can read invoices — that problem is largely solved across vendors. Competitive differentiation is shifting to matching and exception management, which is harder, messier, and more specific to how individual businesses run their procurement.
SME adoption is accelerating at an estimated 18.15% CAGR. SaaS delivery has made these systems accessible without large IT teams or lengthy enterprise procurement cycles. The closed-loop system is no longer only viable for large enterprises. A majority of CFOs in high-performing organizations are now using AI-driven AP tools to monitor cash flow and fraud, per Planergy 2025 — this has moved from an AP operations question to a finance leadership priority.
The practical implication for teams building now: the extraction problem is solved. The harder product work is in exception handling, supplier communication, and ERP write-back reliability. Teams that build the integration layer cleanly will be able to add matching intelligence on top without re-architecting. Teams that bolt automation onto fragmented systems will keep hitting the same manual-keying problem that persists, frustratingly, even as automation adoption rises. The closed loop is becoming the expected baseline — and the organizations still running 14-day invoice cycles are accumulating costs that are easy to ignore until they're not.