AI in Practice / Automating Work
Split Payment and Invoice Matching into AI Candidates and Human Confirmation
2026-12-05
We do not hand the matching of incoming payments against invoices entirely to AI. Nor do we go back to having people check every item by hand. Instead, we split the work in two. AI proposes candidates, saying in effect "this payment and this invoice look like a match," and gives its reasons. A person reviews them and confirms. Anything that cannot be undone, such as sending money, refunding it or contacting a business partner, always comes after that human confirmation. In this article, I explain how we built this split, drawing on three projects we actually carried out.
The trouble starts when a machine declares a match
Matching itself is work that AI does well. It compares invoice amounts with incoming payments, business partner names and dates, and looks for what fits. The larger the volume, the faster it is than a person, and the fewer items it misses.
But matching always includes items that look identical and are not. An invoice for the same amount appears several times. An invoice is replaced by a corrected version, and payments go out against both the old and the new one. A partner's name is spelled slightly differently on the bank statement and on the invoice. If a machine declares these a match and clears them, the error gets buried in the books. Finding it later is far harder than catching it at the start.
So we treat AI output as candidates, not conclusions. Every candidate must come with the reason behind it. A person reads the reason, confirms the item if it holds, and stops it if something looks off. That single point is where we draw the line.
We also bring the place where people confirm onto one fixed screen. If someone simply replies "this is correct" in an email or a chat, nobody can trace later who confirmed what, and when. Candidates and reasons sit side by side, and a record remains when a person presses confirm. Having one such place makes it clear who is responsible for the matching results.
We had AI surface unpaid amounts and overpayments
The first project was a payment check for one company. We had an AI agent connected to the accounting software compare the invoices received from business partners with the data recorded in that software.
The comparison turned up several discrepancies. With one partner, it looked as though the company had overpaid after an invoice was replaced by a corrected version. A possible double payment also emerged. With another partner, some amounts were still unpaid.
The AI's part ended at identifying the discrepancies and drafting a reply email and a transfer request to the partners. A person read the drafts and approved them. Only after approval did the emails go out. People also decided how to handle the unpaid amounts and how to ask for the overpayment to be returned.
The advantage of this approach is that people have less to look at. Instead of rechecking every invoice from scratch, they read only the places the AI flagged as not matching, along with the reasons. Time spent on judgment goes where judgment is actually needed.
We built the matching system as a candidate engine and a confirmation screen
The second project was a system for one company's accounting team to match incoming payments against shared sales information. Here, we split the work from the start. We built three separate pieces: a gateway connecting to the accounting software's API, a script holding the matching logic, and a work screen used by the accounting staff.
The matching script proposes candidates, and the work screen is where people check and confirm. Separating the roles means that fixing the matching logic does not change how people confirm. Likewise, improving the screen does not change the matching results. When you fix one side, you worry less about breaking the other.
During development, Codex pointed out a matching error. There was a path that linked different transactions as if they were the same. We revisited the approach and corrected how repeated occurrences of the same amount were counted, and the problem went away. All the tests passed as well. Repeated identical amounts are exactly where it is dangerous for a machine to declare a match. Having a different AI read the work while it was being built paid off.
We also connected the system to Slack, which the company uses for internal communication, and confirmed it could pull in posts from real data. Production rollout, however, is still on hold. Finishing verification in a local environment and starting to use the system in daily work are separate decisions. We are moving forward one stage at a time.
We designed the next candidate lists together with the people who approve them
The third project was a design to reduce manual work for the accounting staff. Here we worked out three mechanisms.
- Match company card statements by merchant name, then produce candidates for who made each purchase and a draft request asking that person to confirm
- Compare one company's journal entries with past records and, once a month, list entries whose department or account looks unusual
- Match cases where customers who switched to direct debit also paid by bank transfer, and produce a candidate list to prevent receiving payment twice
Each one outputs candidates and lists. The AI does not correct journal entries or issue refunds on its own. For each design, we defined the inputs, the output format and what would count as success. We also wrote down where each would run and who would approve it. We set a minimal procedure for the first trial as well.
All three are still at the design stage. Even so, deciding who approves at the design stage matters. If you try to decide who confirms the candidates after the system is built, candidates tend to pile up with nobody confirming them.
What leaders should decide first
Before bringing in any tool to automate matching, there are things to settle. Across these three projects, these are the points we decided first.
- Decide who confirms. Before building anything that proposes candidates, decide who will look at them and confirm. Candidates without an owner go unread.
- Require a reason for every candidate. Do not build a system that only says "match." Have it state, in a form people can read, why it judged a match and where the discrepancy lies.
- Put irreversible actions after a person. Sending money, refunds, contacting partners and closing the books happen only after a person confirms. Machines prepare drafts; people send.
- List the risky situations in advance. Repeated identical amounts, replaced invoices, inconsistent spellings of names. Write down where your own matching tends to go wrong, and have a different AI check those points while you build.
- Roll out to production in stages. Even if local verification passes, do not move straight into daily work. Confirm each stage before going further.
Matching is work that comes around every month without fail. That is exactly why AI should propose candidates quickly while people focus on confirming them. Drawing this line between roles at the start is the foundation for keeping automation running over the long term.