Accounts Payable Automation and Three Way Matching in ERP: Paying Supplier Invoices Without Errors
In this article
- Summary
- Why accounts payable often becomes a bottleneck
- Two way, three way, and four way matching
- Setting variance tolerances
- Handling exceptions with a clear workflow
- The role of AI and OCR in reading invoices
- The data foundation that decides success
- Payment scheduling and cash management
- Steps to implement AP automation
- Indicators worth tracking
- Common mistakes
- Frequently asked questions
- Conclusion
In many companies, the finance team spends most of its time not analyzing numbers but chasing documents. Supplier invoices arrive by email, courier, and WhatsApp. Finance staff match them against purchase orders stored in another folder, then ask the warehouse whether the goods were really received. When there is a price or quantity difference, the invoice sits on someone's desk for days while the supplier starts chasing payment and early payment discounts slip away.
Accounts payable (AP) automation with three way matching in an ERP addresses this problem. This article explains two way and three way matching, how to set variance tolerances, how to handle exceptions, how AI helps read invoices, and how to roll it out without straining supplier relationships.
Summary
- Three way matching compares the purchase order, the goods receipt, and the supplier invoice before the invoice is approved for payment
- Clear variance tolerances let most invoices be approved automatically, while staff focus on exceptions
- AI and OCR speed up invoice reading, but matching rules and approvals remain the main controls
- Clean supplier data, item codes, and units of measure matter more for success than the automation features themselves
- Measure results by processing time per invoice, the share of touchless invoices, and the number of duplicate or wrong payments
Why accounts payable often becomes a bottleneck
AP sits at the end of the purchasing chain. Every mess upstream, such as verbal orders, unrecorded goods receipts, or price changes nobody announced, only becomes visible when the invoice arrives. Finance ends up investigating what actually happened, even though they were not in the warehouse or at the purchasing desk when the transaction took place.
The impact is not only labor cost. Invoices processed late can damage supplier relationships, trigger late payment penalties, or cost the company early payment discounts. On the other hand, invoices approved without adequate checks open the door to duplicate payments, payments for goods never received, and even fraud through fake invoices or changed supplier bank accounts.
Two way, three way, and four way matching
The core of AP automation is document matching. There are several common levels, and the choice depends on the type of purchase and its risk.
Two way matching
The invoice is compared with the purchase order: supplier, goods or service, unit price, and quantity. This suits services or subscriptions without a physical receipt, such as rent, software licenses, or fixed fee consulting. For physical goods, two way matching alone is not enough because it does not prove the goods actually arrived.
Three way matching
Besides the purchase order, the invoice is also compared with the warehouse goods receipt. The system checks that the quantity billed does not exceed the quantity received and that the price does not exceed the agreed price. This is the recommended standard for inventory, raw materials, and capital goods, because it prevents paying for goods not yet or never received.
Four way matching
For goods that require quality inspection, the inspection result is added as a fourth document. Only quantities that pass inspection may be paid in full. This approach is relevant for manufacturers and distributors of quality critical materials, and links directly to quality control in the ERP.

Setting variance tolerances
If the system demands a perfect match, almost every invoice will be blocked by rounding differences, small freight charges, or a few units of difference caused by packaging. Tolerances therefore need to be set in writing. For example, a price difference up to 1 percent or a fixed amount per line can be approved automatically, a quantity difference within the agreed over delivery limit can be accepted, and anything above the limit must be reviewed by purchasing.
Tolerances should differ by category. Raw materials with volatile prices may need looser tolerances, while high value capital goods should have none at all. What matters is that tolerances are set by finance management, recorded in the system, and reviewed periodically, not decided case by case by staff in a hurry.
A tolerance is not a loophole
Track the total value of automatically approved variances each month per supplier. If one supplier always bills slightly above the order price and always stays within tolerance, that is a pattern to discuss, not one to simply accept.
Handling exceptions with a clear workflow
The goal of automation is not to remove human review but to focus human attention on invoices that are genuinely problematic. Every type of exception needs an owner and a deadline.
- Price variance: routed to purchasing to confirm with the supplier, then the order is revised or the supplier is asked for a corrected invoice
- Quantity variance: routed to the warehouse to check receipts, whether goods were not yet recorded or were actually short shipped
- Invoice without a purchase order: returned to the requester for a retrospective order under policy, or rejected
- Duplicate invoice: the same invoice number, date, and amount from the same supplier is flagged before it reaches the approval queue
- Supplier bank account change: verified through the official registered contact, not through the number in the letter or email requesting the change
This workflow should merge with the existing purchase approval flow, so the person who approved an order is also the one who resolves variances on it. A record of who did what and when becomes part of the audit trail and internal controls that auditors need.
The role of AI and OCR in reading invoices
Many supplier invoices are still PDFs or photos of paper. Retyping invoice numbers, dates, line items, and tax takes time and invites errors. This is where OCR and AI models help: reading the document, recognizing the supplier, extracting header and line data, and preparing it for matching. A broader discussion of these techniques is in the article on automating data entry from documents.
A few points to keep in mind. First, extraction results should come with a confidence level, and fields with low confidence should be reviewed by a person. Second, AI must not be the party that approves payment; it prepares data, while matching rules and authorized approvers decide. Third, financial documents contain sensitive data, so the choice of AI service must consider where data is stored and company policy, as discussed in AI usage policy.
In Indonesia, invoices from VAT registered suppliers are often accompanied by an electronic tax invoice. That tax invoice data can serve as an additional comparison source, for example to confirm that the taxable base matches the commercial invoice. Integration between ERP and tax processes is covered in more detail in e-invoicing and tax compliance.
The data foundation that decides success
Automatic matching is only as reliable as the data being matched. If one supplier is registered three times under different names, or one item uses cartons on the order but pieces on the invoice, the system will keep producing false exceptions. Before switching on automation, clean up supplier master data and item codes: one supplier one code, verified bank accounts, recorded unit conversions, and payment terms that match the contract.
Goods receipt discipline is also crucial. Three way matching is useless if the warehouse records receipts several days after goods arrive, or records quantities straight from the delivery note without counting. Make sure receipts are recorded when goods arrive, ideally with a scanner or a phone app, and that differences are reported immediately.

Payment scheduling and cash management
Once an invoice is approved, the next question is when to pay. The ERP can propose payments based on due dates, early payment discounts, and cash position. Finance then selects invoices to pay in one batch, approves them, and sends instructions to the bank. Payment decisions are based on data, not on which supplier calls most often.
This visibility strengthens overall cash planning. Approved but unpaid payables, plus order commitments not yet invoiced, give a picture of obligations for the coming weeks. Connect this data with cash flow visibility in the ERP and the monthly close, because accurate payable accruals are one of the requirements for fast and correct monthly reports.
Steps to implement AP automation
- 01Map the current process: where invoices come from, who checks them, how long it takes, and which variances occur most often
- 02Clean supplier master data, bank accounts, units, and payment terms before enabling automatic matching
- 03Set the rules: which purchases require three way matching, which only two way, and what the tolerances are
- 04Provide a single invoice intake channel, such as a dedicated email address or a supplier portal, and inform suppliers formally
- 05Start with a few high volume suppliers with clean data, measure results, then expand step by step
- 06Review exception and tolerance reports every month, and fix the root causes upstream, not only the symptoms
For large suppliers, a supplier portal lets them upload invoices, see payment status, and update their own data, which reduces routine questions. This concept is discussed in the article on B2B customer and supplier portals.
Indicators worth tracking
- Average time from invoice receipt to approval
- Share of invoices approved without manual touch
- Number and value of exceptions by type and by supplier
- Early payment discounts captured versus missed
- Number of duplicate or wrong payments detected, ideally close to zero
- Processing cost per invoice, calculated from the staff time involved
Common mistakes
- Automating a chaotic process so the chaos simply happens faster
- Setting tolerances so tight that almost every invoice becomes an exception
- Letting purchases without orders remain a habit, then expecting automatic matching to work
- Relying on OCR results without review for low confidence fields
- Changing supplier bank accounts based on an email without independent verification
Frequently asked questions
Does a mid sized business need three way matching? Yes, especially for inventory purchases. Invoice volume does not have to be large; the risk of paying for goods not received is reason enough. For services and subscriptions, two way matching is usually sufficient.
What share of invoices can realistically be approved automatically? It depends on data quality and goods receipt discipline. Early on the figure may be low, then rise as master data and supplier habits improve. It is better to track the month to month trend than to chase a specific number from day one.
Do suppliers have to change how they invoice? Ideally yes, but gradually. Ask suppliers to include the purchase order number on every invoice and send it to one official channel. These two small changes alone help matching a great deal.
Do we need a new ERP? Not necessarily. Many ERPs already have matching features that have not been configured. The first step is to check what the existing system can do and close gaps with integration or add on modules where needed.
Conclusion
Accounts payable automation with three way matching changes the finance role from document chaser to exception controller. Most invoices that match the order and receipt can be approved quickly, while price and quantity variances and suspicious invoices get the attention they deserve. The keys are clean supplier data, disciplined goods receipt, written tolerances, and an exception workflow with clear owners. Start with high volume suppliers, measure the results, then expand step by step.
Want a faster and better controlled supplier invoice process?
The AG·SORA team helps configure ERP, three way matching, and AI invoice reading to fit your company's process. The initial consultation is free with no obligation.
Free ConsultationRecommended for you
Reading related to this topic
Electronic Invoicing and Tax Compliance with ERP: Tidying the Flow from Order to Reporting
How ERP helps issue tidy electronic invoices and maintain compliance: master data, a connected flow from order to invoice, numbering and audit trails, payment reconciliation, purchasing, and handling rule changes.
Automating Invoicing and B2B Receivables Collection: From Order to Cash Received on Time
Tidying the order to cash cycle: correct invoices from order data, triggers and delivery channels, payment terms, polite reminders, automatic payment matching, billing disputes, receivables ageing, and internal control.
A Faster Monthly Close with ERP: From Late Reports to Figures You Can Use
A slow close comes from upstream. How to set up a close calendar, record at the source, reconcile throughout the month, apply cut off rules, handle inventory and recurring journals, review, and lock the period.
Free checklist: choosing a software house
24 points to evaluate a vendor before you sign. Can be saved as a PDF.
Ready to build a system that grows with your business?
Discuss your needs with the AG·SORA team, no cost, no commitment.