Skip to content

AI for accounts payable: matching, exceptions and an audit trail

Updated · 10 min read

The short answer

AI is useful in accounts payable for the reading and checking work: pulling data off invoices, matching them to purchase orders and goods receipts, flagging variances and likely duplicates, and drafting replies to supplier queries. It is a poor fit for deciding what your tolerances should be, approving payments, or changing supplier bank details. Those stay with people, and every agent action should leave a record someone can audit.

Treat an AP agent like any other control: measure it against the rules you run today on a sample of your own invoices, and only switch it on if it clears more invoices without clearing more of the wrong ones. If a vendor cannot tell you where the model runs, whether your data trains it and how long it is kept, keep asking before you sign.

What AP work suits an agent

Accounts payable is mostly reading documents, comparing them with records you already hold and deciding whether the differences matter. Rules engines handle the clean cases well. Where they struggle is the messy middle: invoices in unfamiliar layouts, line descriptions that do not match the purchase order wording, partial deliveries, and credits that relate to an invoice from three months ago. That is where a language model can add something, because it can read context rather than only compare fields.

In practice, the jobs that suit an agent are the ones where a wrong suggestion is caught by a later check, and where a person can see why the agent made it.

  • Capture: extracting supplier, invoice number, dates, totals, tax and line items from PDFs, scans and email bodies, including layouts you have not seen before.
  • 2-way matching: comparing the invoice with the purchase order on price and quantity, and pairing lines when the descriptions differ.
  • 3-way matching: adding the goods receipt, so you only pay for what arrived, and handling partial receipts across several invoices.
  • Variance flags: explaining in plain words why an invoice falls outside tolerance, for example a unit price rise on two lines or an unexpected freight charge.
  • Duplicate detection: spotting the same invoice resubmitted with a changed number, date format or amount rounding, which exact-match rules miss.
  • Supplier queries: reading a supplier email asking where a payment is, looking up the invoice status and drafting a reply for someone to send.

What it should not do

Some AP decisions carry enough risk that automating them removes a control rather than speeding one up. An agent can prepare the information for these decisions, but a named person should make them.

Supplier bank detail changes deserve particular care. A request to update payment details is a common route for invoice fraud, and the right response is a call back to a number you already hold, not a model’s judgement about whether an email looks genuine.

  • Releasing payments or approving invoices above the limits your policy sets for people.
  • Changing supplier master data, especially bank accounts and remittance addresses.
  • Setting or loosening tolerances. The agent works inside thresholds that finance owns.
  • Booking to unusual or judgemental accounts, such as accruals, capital items or intercompany.
  • Overriding a policy because an invoice appears to be in order.

Why a human approval step stays

Even a good model is wrong some of the time, and in AP the cost of errors is lopsided. Holding a correct invoice for a day costs a little goodwill. Paying a duplicate or a fraudulent invoice costs real money and can be hard to recover. An approval step puts a person between the agent’s conclusion and the payment run, which keeps the error that matters most, a false clear, from turning into cash leaving the business.

Approval also keeps accountability where auditors expect it. Your segregation of duties does not change because the preparer is software: someone still owns the approval, and the record should show who approved what, on what evidence. Vendors take the same line. Tipalti, for example, describes letting customers require further approvals even when an invoice has matched automatically, and Stampli says its assistant’s suggestions are subject to validation by the AP team.

The useful design is not to approve everything by hand, but to approve in proportion to risk. Clean matches below a value threshold might be approved in a batch with a sample check. Exceptions, new suppliers and anything the agent is unsure about go to a person one by one, with the agent’s reasoning and the source documents side by side.

Measuring an agent against a rules baseline

The honest question is not whether the agent is accurate but whether it is better than what you already have. Most AP teams run some rules today, either in their ERP or in an AP tool. Run those rules and the agent over the same set of past invoices where you know the right answer, then compare.

Three numbers do most of the work. Match precision is the share of invoices the system cleared that were in fact correct. False clears is the count of invoices it cleared that a person would have stopped, which is the number your controller will care about. Exception rate is the share sent to a person, which is where the time savings come from. Add duplicate detection on a set of planted duplicates, and, if the agent drafts supplier replies, the share a person sent without edits.

The table below shows how such a comparison might read on a set of 1,000 historical invoices. The numbers are illustrative only, not results from any real system. They show a common pattern: the agent clears far more invoices, but makes more confident mistakes, so whether it passes depends on the limit for false clears you agreed before the test.

Metric (illustrative, 1,000 past invoices)Rules baselineAgentWhat to look for
Invoices cleared without a person520 (52%)710 (71%)Higher is better, but only alongside precision
Match precision on cleared invoices99.6%99.2%Should not fall below the level you agreed
False clears26The number that costs money; set a hard ceiling
Exception rate48%29%Drives the time saved by the team
Planted duplicates caught (of 12)911Near-duplicates are where rules tend to miss
Supplier replies sent without editsNot applicable64%A quality check on drafting, not a control

Reading the results

In the illustrative example, the agent saves the team roughly 190 invoices of manual work per 1,000, and catches two more duplicates. It also lets four more incorrect invoices through to approval. If your approval step reliably stops those, the agent may still be worth having. If approvers tend to wave through anything marked as matched, it is not, and the agent should be tuned to send more to a person until false clears are back at or below the baseline.

Look at the errors one by one, not just the totals. A false clear on a small stationery invoice and one on a large capital purchase are not the same. Break the results down by supplier, value band and document type, and check whether the agent is consistently wrong about a particular kind of invoice. That tells you whether to fix the agent, add a rule in front of it, or keep that category manual.

Data handling questions to ask any vendor

Invoices contain supplier bank details, prices, personal data about contacts and, in some sectors, information about customers. Before any of it goes to an AI service, you should be able to answer where it goes, who can see it and how long it stays. The answers differ by provider and by configuration, so ask rather than assume.

The large model platforms publish their positions, and those are a useful benchmark for what to expect from an AP vendor built on top of them. Microsoft states that prompts and completions sent to models it hosts in Azure are not used to train foundation models without your permission, and that data is processed in the geography you choose unless you pick a Global or DataZone deployment. AWS states that Amazon Bedrock does not store or log prompts and completions or use them to train AWS models. OpenAI states that it does not train on business and API data by default. An AP vendor may use any of these, or something else, and its own retention and logging sit on top.

Under UK and EU data protection law, a vendor processing personal data for you needs a written contract covering, among other things, its use of sub-processors, and the ICO has published guidance on how controller and processor roles apply to AI systems. Ask for the data processing agreement early, not at the end of procurement.

  • Where does the model run, and which company operates it?
  • Is any of our data, including corrections our team makes, used to train or improve models, yours or a third party’s? Is that off by default, and is it in the contract?
  • How long are invoices, prompts, outputs and logs kept, and can we set or shorten that?
  • In which region is our data stored and processed, including for backups, monitoring and support access?
  • Can the system run in our own cloud account or tenant, using our model provider agreement?
  • Who are your sub-processors, how will you tell us about changes, and can we object?
  • Will you sign a data processing agreement, and what does it say about breaches, audits and deletion at the end of the contract?
  • Can we export the full audit trail, including what the agent saw, what it decided and who approved it?

Off-the-shelf AP automation as an option

Buying is often the right answer. Several established AP automation products now include AI features for capture, matching and duplicate detection, and they come with integrations to common ERPs, approval workflows and supplier portals already built. If your process is close to standard, start by trialling one of these against your baseline.

Building a custom agent makes more sense when your matching logic is unusual, when you need the agent to work across systems the products do not connect to, or when your data handling requirements mean the model must run in your own cloud tenant. It also costs more to own: someone has to maintain the integrations, the evaluation set and the model configuration over time.

ProductWhat its vendor describesWorth checking
TipaltiBuilt-in 2- and 3-way PO matching at header and line level, with tolerance thresholds by amount or percentageWhich plan includes matching, and how exceptions are routed
StampliAn AI assistant that codes invoice fields, flags duplicates and errors, and routes for approval, with AP validating its suggestionsHow corrections are used and where invoice data is processed
MediusAP automation with 3-way matching and anomaly detection for duplicates, supplier bank changes and unusual amountsHow anomalies are explained to approvers and how alerts are tuned
Custom agentBuilt around your matching rules, systems and hosting, with your own evaluation setTotal cost of ownership and who maintains it after go-live

A pilot plan that protects you

Whether you buy or build, a short, measured pilot is the safest way to find out if AI helps your AP team. Keep it to one workflow and decide the pass mark before anyone sees the results, so the outcome is not argued after the fact.

Wideline’s published AI agent pilot follows this shape: one agent on one real workflow, with human approval steps and an audit trail, and it does not go live unless it beats the baseline agreed at the start. Model usage is billed at cost. Whoever runs your pilot, insist on the same conditions.

  • Pick one workflow, such as 3-way matching for one entity or duplicate checks before each payment run.
  • Build an evaluation set from a few hundred past invoices with known outcomes, including planted duplicates and awkward cases.
  • Run your current rules over the set to get the baseline, and write down the pass marks: minimum precision, maximum false clears, target exception rate.
  • Run the agent in shadow mode on live invoices, alongside the existing process, with every suggestion logged and nothing posted automatically.
  • Go live only if the agent beats the baseline on the agreed measures, and keep the approval step and audit trail in place after it does.
  • Re-run the evaluation set whenever the model, prompts or tolerances change.

Questions

Can AI fully automate accounts payable?
Not safely, and most vendors do not claim it should. AI can take on capture, matching, variance flags, duplicate checks and drafting supplier replies, which removes a large share of manual work. Approval of payments, changes to supplier bank details and setting tolerances should stay with named people.
How is AI invoice matching different from rules-based matching?
Rules compare fields exactly or within a tolerance, which works well for clean data. An AI model can also pair lines with different descriptions, read unfamiliar layouts and explain a variance in plain words. It can also be confidently wrong, so it should be measured against your rules before it replaces any of them.
What is a false clear, and why does it matter most?
A false clear is an invoice the system marks as matched that a person would have stopped, such as a duplicate or an overcharge. It is the error that leads to money leaving the business, so it deserves a hard limit in any pilot, separate from headline accuracy.
Will our invoice data be used to train AI models?
It depends on the provider and the contract. The major model platforms publish positions on training with business data, but an AP vendor may add its own logging, retention and improvement programmes on top. Ask the vendor directly and get the answer written into the data processing agreement.
Should we buy an AP automation product or build a custom agent?
Try a product first if your process is fairly standard and it connects to your ERP. A custom agent is worth considering when your matching logic is unusual, the work spans systems a product does not reach, or your data must stay in your own cloud tenant. In either case, measure it against your current baseline before go-live.

Sources

  1. Tipalti: Built-in two- and three-way PO matching
  2. Stampli: Meet Billy, Stampli’s accounts payable AI
  3. Medius: Accounts payable automation
  4. Medius: How to prevent duplicate payments in accounts payable
  5. Microsoft Learn: Data, privacy, and security for Foundry Models sold by Azure
  6. AWS: Data protection in Amazon Bedrock
  7. OpenAI: Business data privacy, security, and compliance
  8. ICO: Guidance on AI and data protection
  9. GDPR Article 28: Processor