# How to Match Customer Payments to Invoices With AI

> Many customer payments say nothing about the invoices they pay. AI agents tie each one to its invoices with the evidence, and hand your clerks the few that need a question.

By Piotr Babel, Partner @ Qvery · Published 2026-11-18 · 16 min read
Canonical: https://qvery.ai/blog/build-remittance-matching-agent/

Every morning, someone on your receivables team opens the bank's deposit file and works out what each payment pays. Accountants call it cash application: matching each customer payment to the invoices it settles.

The bank line rarely says. A wire arrives with a trace number (the bank's own reference) and no invoice, and the list of invoices it covers sits in an email, a customer's portal or the stub of a mailed check.

Until someone finds it, the money waits on the customer's account as unapplied cash, and the invoice it paid still reads past due.

So the collector calls customers who already paid.

In the sample month below, six of the ten calls on the collector's list for the week were for invoices whose payment had been sitting on account since September:

**Six invoices on the week's call list, each already paid by a payment sitting on account**

| Customer | Paid in September | Invoice on the call list | Days past due |
|---|---:|---:|---:|
| Ravenwood Hydraulics | $3,557.44 | 71320 | 56 |
| Copperfield Stamping | $9,958.87 | 71322 | 53 |
| Ironbridge Welding | $4,003.95 | 71325 | 50 |
| Sable Creek Packaging | $4,781.98 | 71326 | 47 |
| Harbor Point Machining | $9,618.81 | 71327 | 44 |
| Oakmont Precision | $9,514.87 | 71329 | 41 |

Each payment equals its invoice to the cent: **$41,435.92** of paid invoices, chased.

The hours are the other cost. A desk applying about 400 payments a month at 15 minutes each spends **1,200 hours a year** on it, more than $44,000 of a clerk's time at $36.79 an hour with benefits.

At Qvery, we help distributors spend less applying cash and stop chasing paid invoices, with custom AI agents that match each deposit and draft every customer question.

We ran one month end to end for a company that does not exist: Corwin Dale Industrial Supply, a 220-person industrial supplies distributor in Cleveland, on Epicor Prophet 21. Every file is invented, and the answer key was written before anything ran.

The files are the ones a real month brings: October's deposit file, the open invoice report, two customers' payment advices (their notes of which invoices a payment covers), the bank's lockbox report (the list of checks customers mail to the bank), the collector's call list and the team's written procedure.

- **123** customer payments, $3,249,510.03
- **109** tied to their invoices with the evidence
- **14** left for a person, each with its question
- **6** paid invoices on the week's call list

Source: Our run of the agents on Corwin Dale Industrial Supply's sample files for October 2026

Eight steps get there, the same eight Qvery's agents run each morning once they are on your desk. A week of your own deposits runs through them too.

**What you'll need**
- **Bank file:** the deposit file or statement for the accounts customers pay into, as a CSV export or a PDF
- **Open invoices:** the open invoice report from your accounting system, with each customer's terms and any credit notes
- **Payment notes:** the inbox where customers send remittance advices, and any portals you download them from
- **Lockbox reports:** the bank's batch reports, if customers mail checks
- **Procedure:** your written cash application rules, however short

Time: one month of files; the matching itself takes seconds, the written reasons a couple of minutes

This matches payments to invoices. It applies no cash, sends no email, writes nothing off and sets no credit.

## Step 1: Your Procedure Decides What Counts as a Match

The agents start where a new clerk would: the team's own rules. A model reads the written procedure into rules code can apply, and each rule keeps the sentence it came from.

Corwin Dale's procedure gives the agents six:

1. **Applied** only when the bank text or the customer's advice names the invoices, or the customer's open invoices add up to the payment exactly
2. **Held** when a payment fits two sets of invoices, until the customer says which
3. **Written off** when short by up to $25.00; anything larger goes to the deduction queue (the list of short payments to resolve), and the collector asks within two business days
4. **Discount** of 2 percent only for customers on 2/10 Net 30 terms (2 percent off if paid within 10 days, otherwise due in 30), paid within 10 days of the invoice date
5. **On account** after 5 business days unmatched
6. **Lockbox** reports checked against the bank deposit before posting, differences to the Controller the same day

![Step 1 sheet: the six rules read from Corwin Dale's cash application procedure, each beside the sentence it came from, and the blank owner of the weekly review.](https://qvery.ai/blog/build-remittance-matching-agent/screenshot-procedure-rules.webp)

*The procedure read into rules, each beside the sentence it came from*

The check that matters here is the blank. Section 5 ends "The weekly review of cash on account is done by ____." The read returns that owner as missing, never a name, and the agents apply only the rules the procedure states.

> ⚠️ **Where one of our two models slipped** It filled the field for the hold rule with notes about other things, so its read lost the rule that stops a guess. Code catches that: a rule whose words cannot be found in the procedure is refused, and the step stops until someone looks.

## Step 2: Every Deposit Gets a Customer Before an Invoice

The deposit file comes in whole, and code proves it before anything else: each running balance must follow from the line before. October's 129 lines tie from the first to the last.

Six of them are not customer cash (three payroll runs, an outgoing check, a bank charge and the month's interest) and leave the job, which keeps **123 customer payments** worth $3,249,510.03.

Then each bank name is tied to a customer. "HARTWELL MACH GRP" is Hartwell Machine Group; "VANCE INDUSTRIAL" is Vance Industrial Coatings.

Lockbox deposits come under the bank's batch name, and step 6 opens them. Every other payment tied to one customer except a $45,000.00 wire on 22 October from "ORIG NOT PROVIDED". Step 4 comes back to it.

![Step 2 sheet: October's first deposit lines with the bank's name for each payer and the customer it ties to; payroll, a check and a fee set aside; a $45,000.00 wire with no customer.](https://qvery.ai/blog/build-remittance-matching-agent/screenshot-deposits-customers.webp)

*October's deposits, each with the customer its bank name ties to*

**Tips**

> If the remittance has invoice numbers, cool, 2 min job. If not, I'm emailing the customer asking what the heck they actually paid for.
> ([r/Accounting · Oct 2026](https://www.reddit.com/r/Accounting/comments/1wxw5aa/ar_people_how_do_you_handle_customer_remittances/pdz93u1/))

> Sometimes we get a payment and the account name has nothing to do with our customer's business name though. In those cases, I email myself and my boss when I find out who that name is so we can search our emails and figure it out next time.
> ([r/Accounting · Jan 2026](https://www.reddit.com/r/Accounting/comments/1qdssrt/client_paid_8450_with_reference_payment_now_i/nzva2g9/))

> I usually ask what invoices they are paying but if they don’t answer you then just apply to the most aged invoice
> ([r/Accounting · Jan 2026](https://www.reddit.com/r/Accounting/comments/1qdssrt/client_paid_8450_with_reference_payment_now_i/nzs9onh/))

A bank name that differs from your records is a pairing your clerk confirms once. It then becomes a written rule for that customer, so the next payment from the same account ties without a search.

## Step 3: Most Payments Name Their Invoices Somewhere

The bank line itself carries little, so the agents look wherever a payment's invoices are named.

> 💡 **Why the bank line says so little** An ACH payment between companies (an automated clearing house bank transfer) has one note field of 80 characters, which the payment network's own guide says "may or may not be displayed to the recipient". A full list of invoices travels in another format, CTX, which supports up to 9,999 such records.

**50 payments** put invoice numbers in the bank text itself. Two customers sent advices instead: Ferrous Valley as a PDF, and Hartwell Machine Group attached to an email, which turns out to matter.

Hartwell Machine Group's wire reached the bank as "PMT OCT 15 REF 0948 7731": no invoice in sight. The advice attached to its email lists six invoices, 71079 to 71089, that total **$84,650.00**, the wire to the cent, and each line equals that invoice's open amount.

![Step 3 sheet: Hartwell Machine Group's $84,650.00 wire, the six invoices on its emailed advice, each equal to its open amount, and the note that the email's date disagrees.](https://qvery.ai/blog/build-remittance-matching-agent/screenshot-hartwell-advice.webp)

*Hartwell's bank line, its emailed advice and the six invoices proposed*

The email, though, is dated 4 November and says "We sent one wire today." The advice says the wire is dated 15 October, and so does the bank.

The agents take the payment's date from the bank and the advice, propose the six invoices, and note that the email disagrees. Both models we ran caught it; the sample's own answer key did not.

A few proposals look wrong at first sight and stand once their evidence is read, and the agents mark them that way.

**Proposals that look odd and stand**

| Payment | What looks odd | Why it stands |
|---|---|---|
| Stonecrest Holdings, $22,480.00 | Pays three invoices billed to two sister accounts | The bank text names all three, and they add up exactly |
| Alder Hose and Fitting, $15,075.55 | Less than its three invoices | It nets credit note CM-5517, $1,840.00, which the bank text names |
| Hartwell Machine Group, $84,650.00 | Its bank line names no invoice | The emailed advice lists the six invoices |
| Meridian Tool and Die, Kingsbury Gear | Each paid 98 percent | Both are on 2/10 Net 30 and paid within 10 days |

## Step 4: Arithmetic Settles Most of the Rest

**63 payments** carried nothing but a trace number, with no advice behind them. For each, code searches that customer's open invoices for the set that adds up to the payment to the cent, in sets of up to six invoices.

For 62 of them, exactly one set fits.

Thornwood Fabricators paid $106,241.96 on 1 October, and four of its invoices add up to it: 70207, 70239, 70348 and 70450. The procedure allows exactly this test, so the agents propose the set and label it "amount only", which tells the clerk to look twice.

The search also shows where a match must stop. Brightline Pump Company paid **$9,412.60** on 9 October, and two of its open invoices, 71289 and 71291, are each $9,412.60. Both are shown, neither is chosen, and an email asking Brightline which one it meant is drafted for the clerk.

> 🔍 **An equal amount is evidence, never proof.** The $45,000.00 wire with no payer matches one invoice on the whole ledger: 71288, Redhawk Manufacturing, $45,000.00. It stays "not found": a wrong guess would close an invoice Redhawk still owes and hide someone else's payment. The fix is asking the bank who sent the wire, and the check is the deposit showing under a named payer on a later list.

> What the agents compare a payment with decides how far you can trust the match. An invoice number in the bank text is evidence. A set of invoices that adds up is good evidence inside one customer and none at all across the whole ledger. So the agents label every proposal with what it rests on, and your clerk sees "amount only" before trusting it.
>
> Piotr Babel, Partner @ Qvery

## Step 5: Every Short Payment Gets Its Gap in Dollars

Ferrous Valley Manufacturing's advice lists three invoices, $31,200.00, and says "Status: paid in full." The bank received **$28,700.00**. The agents match the payment to the three invoices for the part it covers and show the gap: **$2,500.00**.

The procedure routes it. Anything over $25.00 goes to the deduction queue, and the collector asks within two business days. The agents draft the question, worded as a fact about the payment and never a verdict on the customer:

**The email the agents drafted for Ferrous Valley, as written**

```
To: Ferrous Valley Manufacturing (office@ferrousvalley.example)
Subject: Payment advice dated October 19: $2,500.00 difference
Hello,

Thank you for your payment advice dated October 19, 2026 for invoices 71091, 71092 and 71093, totalling $31,200.00.

The ACH we received (reference TRN 61741387) was $28,700.00, which is $2,500.00 less than the advice. Could you let us know whether the remaining $2,500.00 is being sent separately, or whether it relates to an adjustment we should look at together? We will apply the funds as soon as we hear from you.

Thank you,
Accounts Receivable
Corwin Dale Industrial Supply
```

Six payments took a 2 percent discount. Two came from customers on 2/10 terms inside the 10 days, and they stand. The other four came from customers on Net 30 terms, who get no discount:

**Four discounts the terms do not allow**

| Customer | Terms | Paid after invoice | Discount taken |
|---|---|---:|---:|
| Fallbrook Tooling | Net 30 | 8 days | $152.82 |
| Brandt Valve and Pipe | Net 30 | 8 days | $152.65 |
| Highmark Bearings | Net 30 | 5 days | $405.93 |
| Torrey Pines Plastics | Net 30 | 8 days | $475.93 |

**$1,187.33** in one month, each over the $25.00 line, so each goes to the deduction queue with its invoice and terms attached. Whether to chase it, credit it or change a customer's terms is a decision for your team.

## Step 6: The Lockbox Report Is Checked Before Its Checks

A lockbox deposit is two documents that must agree: the bank's credit and the bank's report of the checks inside it. Corwin Dale's batch of 26 October holds nine checks. The report totals **$139,072.05**; the bank credited **$138,072.05**.

Eight checks equal the invoices on their stubs. Check 58239 from Delmar Conveyor reads $13,450.00 on the report against invoice 71307, open at $12,450.00: keyed **$1,000.00** too high. It goes to the Controller the same day, as the procedure says, and no check in the batch is applied until the two documents agree.

![Step 6 sheet: lockbox batch 044's nine checks against their invoices, the report total of $139,072.05 against a bank credit of $138,072.05, and Delmar Conveyor's check $1,000.00 over.](https://qvery.ai/blog/build-remittance-matching-agent/screenshot-lockbox-batch.webp)

*Batch 044: the bank's report, the bank's credit and the one check that differs*

Six more lockbox deposits, **$82,154.41**, arrived with no report at all. Nothing in the files says whose checks they are, so the agents list them with one request: the bank's batch reports.

## Step 7: Paid in September, Still on Monday's Call List

One finding on the list is not an October deposit at all. Six customers paid in September, and their payments went on account, as the procedure does with cash not matched within five business days.

> 📞 **Six paid invoices on the call list** 
> - **What it is:** cash on account from a customer that equals one of its open invoices to the cent, so the invoice still reads past due
> - **How it turned up:** code set September's cash on account beside this week's call list; all six match, $41,435.92, up to 56 days past due
> - **The fix:** a clerk applies each payment to its invoice, and six calls come off Monday's list
> - **The check:** next week's call list should carry none of the six

Why it piled up is in the procedure: nobody is named to review cash on account each week.

The agents name the blank; who fills it is your call.

## Step 8: What the Clerk Opens at Nine

Our run ends in one workbook. The first sheet lists every payment with its proposed invoices, the evidence and one of four labels: proposed, short, ambiguous or not found. The second is the clerk's list: every payment that needs a person, with its question or next step.

![Step 8 sheet: the 14 payments left for a person with their labels and the question or next step for each, and six customers' cash on account set against the call list.](https://qvery.ai/blog/build-remittance-matching-agent/screenshot-payments-to-ask.webp)

*The second sheet: the 14 payments left for a person and September's cash on account, each with its question or next step*

The totals prove nothing was dropped: **109** proposed and **14** left add up to the month's 123 payments and $3,249,510.03. Nothing is applied until a clerk confirms it in Prophet 21, and every correction is kept with who made it and why.

Code ran October in under a second. The models took about two minutes to read the advices and the procedure and to write fifteen reasons and six emails.

Free report: accounting/remittance-matching

## Where Qvery's Agents Take the Morning Deposits

At Qvery, we build custom AI agents for receivables desks, connected to the bank file, the inbox and the accounting system you already run.

Each morning the agents pick up the previous day's deposits, read the payment emails and their attachments, download advices from the customer portals you authorize, read-only, and propose the invoices each payment settles with the evidence behind it.

![The deposit file and remittance inbox feed the AI agents, which tie each payment to a customer, find its invoices and check deductions; the clerk confirms and applies the cash.](https://qvery.ai/blog/build-remittance-matching-agent/illustration-remittance-agents.webp)

*The AI agents propose each payment's invoices with the evidence; your clerk confirms and applies the cash.*

The clerk works down the list, confirms or corrects each proposal, and applies the cash. What the agents may touch is the question this job raises, because it is money and customers' bank details:

**What the agents may and may not touch**

| The agents do | The agents never do |
|---|---|
| Read the bank file, the receivables inbox folder you name and the portals you authorize | Read the rest of your mail |
| Propose invoices with the evidence, and label what each rests on | Post a receipt or apply cash |
| Draft the customer's question and the deduction note | Send an email to a customer |
| Mask bank account numbers in everything they show | Write off a short payment |
| Log every proposal and every correction | Approve a match on its own |

Before the agents touch a system, we agree in writing what they may read and where the data is processed, and as an EU company, Qvery AI OÜ puts those terms in a data processing agreement we both sign.

Customer payments are one of three jobs the accounting playbook prices for a finance team this size, beside [entries between your own companies](https://qvery.ai/blog/why-intercompany-eliminations-dont-net/) and the close.

Industry Playbook: https://qvery.ai/industry-playbooks/ai-agents-for-accounting/

## What 400 Payments a Month Cost by Hand

Put your own desk's numbers in. The example is a distributor of about 220 people applying 400 customer payments a month across its accounts, at 15 minutes each by hand and 3 with the agents, at $36.79 an hour with benefits.

(An interactive calculator on the page: roi-payments-applied.)

On those numbers, each payment costs **$9.20** to apply by hand and **$2.51** with the agents, running cost included. That is **960 hours a year** handed back and $32,078 saved after an estimated $3,240 a year to run the agents. Every $10,000 of build is earned back in about **3.7 months**.

The minutes are assumptions, and the run is why they are not generous.

A payment that names its invoices takes a clerk a couple of minutes; one solved by adding up a customer's invoices, or by asking the customer, takes far longer, and those are the ones the agents settle or prepare. The 3 minutes with the agents is a clerk reading each proposal's evidence and working the short list.

The calculator leaves out the calls. Six of one week's ten calls were set to chase invoices already paid, with $41,435.92 on account; the collector's time and the customers' patience are costs no field prices.

> From the owner's chair, cash application looks like data entry. Its cost shows up somewhere else: a customer telling your collector they paid a month ago, and cash on account that nobody has looked at since. Both start with a payment nobody matched. Matched each morning with the evidence attached, the list your collector works from is true.
>
> Vlad Shvets, Partner @ Qvery

## What We Need From Your Receivables Desk

To start, we need a month of past deposits with their remittances, your open invoice export and whatever your team has written down about how it applies cash. If someone keeps notes on which customers pay oddly, we start there.

In the first week we learn your bank file's layout, your invoice export and your customers' habits.

In the second, the agents run on your real deposits beside your clerks, and we compare their proposals with what your clerks applied by hand. When that comparison satisfies you, the morning starts from the agents' list, and each week we count the hours handed back and the errors stopped.

Qvery Matches Your Deposits to Invoices Each Morning: https://calendly.com/qvery-vlad/30min

Your clerks keep every decision about the cash, and they start the morning knowing which payments need them.

## Frequently asked questions



### Does it work with NetSuite, Business Central or QuickBooks Online?

It works from the open invoice report your system already exports, so NetSuite, Business Central, Sage Intacct and QuickBooks Online all fit. Where your system allows a read-only connection, we use it, and the invoice list is current every morning. Your clerks still apply the cash where they do today.

### What happens when one payment covers a dozen invoices?

When the advice lists them, the agents check every line against its open amount and confirm the lines add up to the payment. Without an advice, they search that customer's open invoices for the set that adds up exactly, and label it "amount only" so your clerk looks twice.

### How does it handle a payment with no reference at all?

It ties the bank's name for the payer to a customer first, then searches that customer's open invoices. If no customer can be named, the payment is "not found", even when one invoice on the ledger equals it, and the agents list what would identify it.

### Will it apply payments to the oldest invoice when nothing matches?

Only if your procedure says so. Some teams apply unmatched cash to the oldest open invoice, others hold it until the customer answers. The rule is yours to write once; the agents follow it in their proposals, and your clerk confirms each one.

### How are short payments and deductions handled?

The agents match a short payment to the invoices it covers and show the gap in dollars, quoting the customer's reason when an advice gives one. Your write-off line decides what clears and what goes to the deduction queue, with a drafted question for whoever handles deductions.

### Can it check early-payment discounts?

Yes. It compares each discount taken with the customer's terms on the open invoice report and the days between the invoice and the payment. A discount the terms do not allow shows as a short payment, with its invoice and the terms beside it.

### What about checks that come through a lockbox?

The agents set the bank's lockbox report against the bank's credit before any check is proposed, then each check against the invoices on its stub. A batch that does not agree goes to whoever your procedure names, and a deposit without its report is listed with a request for it.

### Can it read remittances from our customers' payment portals?

Yes, in the build. With the logins you provide, the agents download advices from the customer portals you authorize, read-only, beside the ones that arrive by email. An advice that arrives twice is counted once.

### Can it stop collectors calling customers who already paid?

That is what matching each morning is for: a payment proposed and applied the day it lands takes its invoice off the past-due list before anyone calls. In the sample month the agents also set September's cash on account against the week's call list and found six paid invoices on it.

### Who sees our customers' payment details?

The agents open only the inbox folder, files and portals you name, and mask bank account numbers in everything they show. A written agreement before the build names who at Qvery sees your data, where it is processed and when it is deleted. Nothing they read trains another company's AI.

### What if it proposes the wrong invoices?

Your clerk sees the evidence beside every proposal, so a weak one stands out before any cash moves. Each correction is logged with who made it and why, and where it reflects a customer's habit, we write it into that customer's rules.

### Does it work across several entities or currencies?

Yes. Each entity's bank accounts and open invoices stay apart, and every proposal names the entity. A payment that lands in one entity's account for a sister company's invoice is flagged, not matched, and foreign payments are compared in the invoice's currency.

### How soon could it run on our deposits?

Two weeks from kickoff, beside your clerks. The first week goes on your bank file, your invoice export and your customers' habits; the second compares the agents' proposals with what your clerks applied by hand. A month of past deposits and their remittances is all the setup needs.

### How much does running it take each month?

On the example desk of 400 payments a month, about $270: model usage for the advices it reads and the payments it explains, plus hosting, the log of every proposal and upkeep of your rules. A payment that ties on its evidence uses almost no model time.
