AI agents

Matching customer payments to invoices with an AI agent

How an AI finance agent applies incoming payments to open invoices, handles part-payments and missing references, and when it should ask you.

The short answer

An AI finance agent matches customer payments to invoices by reading the payer, amount, currency, reference and date on each receipt and comparing them with your open invoices. Exact matches can be applied automatically; part-payments, combined payments, missing references and unknown payers should be proposed with the evidence and confirmed by a person.

What cash application is, and why it slips

Cash application is the work of deciding which invoice a customer's payment settles. It sounds trivial when a customer pays one invoice in full and quotes the invoice number. In practice customers pay three invoices in one transfer, deduct a bank charge, pay in a different currency, quote their own purchase order instead of your reference, or pay from a director's personal account. Each of these leaves a receipt sitting unapplied and an invoice showing as overdue.

The cost is real even when the money has arrived. Unapplied cash makes the aged debtors report wrong, which means reminders go to customers who have already paid, and genuine late payers are hidden among them. It also makes the cash forecast less reliable. This is closely related to bank reconciliation, covered in AI bank reconciliation: how it works and where it fails.

How an agent matches a receipt

A well-designed agent works through the evidence in a fixed order and records which step produced the match:

  1. Reference. An invoice number in the payment narration is the strongest signal, provided the amount also fits.
  2. Amount and payer. A single open invoice for the same amount from the same customer is a likely match.
  3. Combinations. If no single invoice fits, the agent tests whether the amount equals two or more open invoices for that customer.
  4. Tolerances. A shortfall equal to a typical bank charge or a known early-payment discount can be proposed as a match with a small difference.
  5. Payer identity. A payment from an unfamiliar account name is checked against names you have linked to the customer before.

This is why clear invoices help. GOV.UK sets out what a UK invoice must include, such as a unique identification number, and putting that number prominently with a request to quote it makes the first step succeed far more often.

Which matches to automate

SituationSuggested handling
Reference and amount both match one invoiceApply automatically
Amount matches one open invoice from that customer, no referenceApply automatically once you have confirmed the rule for that customer
Amount equals a combination of open invoicesPropose; confirm unless the customer always pays this way
Short by a small, typical bank chargePropose with the difference posted to bank charges, under a set limit
Part-payment of one invoiceApply as part-payment and flag the balance still due
Payment in another currency than the invoicePropose with the rate used and the exchange difference shown
Unknown payer or no plausible matchHold in unapplied cash and ask

The rule of thumb is that the agent may apply cash when there is only one reasonable reading of the evidence. When there are two, a person chooses.

A worked example

Example only. A Lagos-based training company has 140 open invoices. On one morning it receives 22 transfers:

  • 14 quote the invoice number and match exactly. Applied automatically.
  • 3 have no reference but match the only open invoice from that customer. Applied under confirmed rules.
  • 2 equal combinations of invoices: ₦850,000 settling invoices of ₦500,000 and ₦350,000. Proposed and approved in one click.
  • 1 is ₦25 short on a ₦1,200,000 invoice, the size of a transfer charge. Proposed with the difference to bank charges.
  • 1 is a dollar receipt against a naira invoice. Proposed with the rate used.
  • 1 arrives from a personal name the agent has not seen. Held as unapplied, with a question about who it might be.

The owner reviews five items rather than twenty-two, and the debtors report is correct by mid-morning. For the Nigerian context, payment reconciliation in Nigeria explains why transfer narrations are often incomplete.

Habits that improve the match rate

  • Give each regular customer a dedicated account number or reference where your bank supports it, so the payer is identified on arrival.
  • Ask customers to quote invoice numbers, and repeat the request on reminders.
  • Agree in writing how discounts and charges are treated, so the agent's tolerances reflect your terms.
  • Review unapplied cash weekly. A receipt left unapplied for a month is often a customer who will later dispute a reminder.
  • Never let an agent write off a customer balance to force a match. Small differences can have a limit; anything larger is a decision.

Keep the trail. Tax authorities expect records that support your figures: HMRC, the IRS and the CRA all publish guidance on keeping business records, and a match log showing why each receipt was applied is part of that evidence.

Where Pryme fits

On a Pryme Business account, virtual accounts can give customers their own account details, so a payment identifies the payer as it lands. The Finance agent reconciles receipts against bank feeds and open invoices across naira, dollar, pound and euro balances, and every applied payment traces to a posted journal with a named source. Items it cannot match with confidence wait for you.

Questions people ask

What is unapplied cash?

Money that has arrived in your bank but has not yet been allocated to a specific invoice. It is real cash, but your debtors report will still show the invoice as unpaid.

Can the agent handle part-payments?

Yes. It can apply the amount received, show the balance outstanding and include that balance in later reminders, with a person confirming unusual cases.

What if a customer pays the wrong amount by mistake?

The agent should apply what it can, show the difference and bring it to you. Whether to refund, credit or chase is a decision for a person.

Does matching work across currencies?

It can, if the agent records the exchange rate used and the difference created. Large or unusual differences should be reviewed.

Sources

  1. GOV.UK: Invoices, what they must include · accessed Oct 2026
  2. IRS: Recordkeeping for small businesses · accessed Oct 2026
  3. Canada Revenue Agency: Keeping records · accessed Oct 2026
  4. HMRC: Record keeping for VAT (VAT Notice 700/21) · accessed Oct 2026

This article is general information, not financial, legal or tax advice. Products described are provided under the terms on this site and are subject to regulation and eligibility.

More on AI Finance agent