Machine learning for payment prediction in accounts receivable
How machine learning predicts which invoices will pay late, what data it learns from, and how an AR agent turns those predictions into action before invoices go past due.
Machine learning for payment prediction estimates when each invoice will actually be paid, not just when it is contractually due. The model learns from a customer's past payment behavior and the attributes of the invoice, then scores every open invoice by how likely it is to pay late and by how many days. That lets an AR team act on the invoices heading for trouble before they ever go past due.
This matters because most collections work is reactive. A team waits for an invoice to age, sees it on the report, then starts chasing. Prediction flips that. If the model knows a customer who is technically current will pay 12 days late, the work can start now, while a gentle nudge still moves the date. The value is not the forecast itself. It is the earlier, better-targeted action the forecast makes possible.
What payment prediction models learn
A prediction model is trained on historical invoices that have already been paid. It looks at the attributes each invoice had when it was open and learns which ones correlated with late payment. Over thousands of invoices it builds a picture of what a late payment looks like before it happens.
The output is usually two things: a probability that an invoice pays late, and an estimated payment date. Some models also output a confidence band, which matters because a prediction the model is unsure about should be treated differently from one it is confident in.
The models that do this well are not exotic. Gradient-boosted trees and similar tabular methods handle the mix of numeric and categorical signals AR data throws off, and they are easy to interpret, which finance teams need. The sophistication is less in the algorithm than in the features: how you encode a customer's payment rhythm, how you represent an open dispute, how you capture that the customer paid late the last three times but on time before that. Good features beat a fancy model on this problem almost every time.
It helps to be clear about what the model is not. It is not a credit decision, and it is not a verdict on whether a customer will ever pay. It is a timing estimate on a specific open invoice, made from patterns in your own history. Treat it as a planning input, not a judgment about the relationship.
Data signals that predict late payment
The single strongest predictor is a customer's own history on your ledger. How many days do they typically run past terms? Are they consistent or erratic? A customer who always pays on day 38 of net-30 is predictable, and predictability is what a model rewards.
The signals that carry the most weight:
- Customer payment history. Average days late, variance in that number, and the trend over recent invoices.
- Invoice size. Large invoices often follow a different approval path inside the customer and pay on a different rhythm than small ones.
- Timing. The day of the month an invoice falls due interacts with the customer's own payment run dates.
- Open issues. A dispute, short pay, or unresolved deduction on the account signals a payment that will stall.
- Response history. Whether the customer has opened, replied to, or ignored past reminders.
Third-party credit data adds context for thin-history accounts, but for any customer you have billed more than a handful of times, their behavior on your own ledger predicts their next payment far better than an external score.
A short worked example shows why behavior beats labels. Two customers both carry a clean external credit rating. Customer A has paid your last 20 invoices on day 31 of net-30, like clockwork. Customer B has paid the last 20 anywhere from day 25 to day 55, with three short pays mixed in. The external score treats them as equals. The model does not. It predicts Customer A within a day or two and flags Customer B's next invoice as high-variance and likely late. The action you take on each is completely different, and only the behavioral view tells you that.
Turning predictions into agent priorities
A prediction is useless if it sits in a report. The point is to reorder the work. Instead of working the aging report top to bottom, the team works the invoices most likely to slip and most worth saving, weighted by amount.
This is where an autonomous agent changes the economics. A human collector can only act on so many predictions a day, so a prediction about a small invoice rarely earns attention. An agent has no such limit. It can take the predicted-late signal on every invoice across the whole ledger and start tailored outreach on each one, days before the due date, without anyone triaging a list. Prediction sets the priority, the agent does the work, and the same approach is what drives AI for DSO reduction when it runs continuously rather than in monthly batches.
Proactive vs reactive collections
The difference prediction makes is the difference between proactive and reactive collections. Reactive means you contact a customer because an invoice is already late. Proactive means you contact them because the model says it is about to be.
That earlier window is where the cash is. A reminder sent two days before a predicted-late payment often pulls the date forward. The same reminder sent two weeks after the due date is just chasing money that is already stuck. Prediction does not collect anything on its own. It buys the time in which a well-timed action still works.
Accuracy, drift, and retraining
A model trained once and left alone decays. Customers change how they pay, your customer mix shifts, and the economy moves. This is called drift, and it shows up as predictions that were accurate last quarter quietly getting worse.
The fix is monitoring and retraining. Compare predicted payment dates against actual ones, watch the error widen, and retrain on fresh data before the gap matters. A healthy prediction system is never finished. It learns from every invoice that closes and folds that into the next forecast.
Two practical warnings. First, set expectations by segment. The model will be tight on repeat customers with stable patterns and loose on new accounts with little history, so report accuracy by segment rather than as one ledger-wide number that hides where it is weak. Second, do not chase perfect accuracy. Being within a few days on most invoices is enough to change what you do, and the action the prediction triggers matters more than the last decimal point of precision. A model that is roughly right and acted on beats a model that is exactly right and ignored.
Connecting prediction to forecasting
Invoice-level payment prediction rolls up into a cash flow forecast that beats a naive terms-based one. If you forecast cash by assuming every customer pays on terms, you will be wrong in a predictable direction, because most customers run late. Prediction replaces that assumption with a learned estimate per invoice, and the aggregate is a sharper view of when cash actually lands.
How Rex uses payment prediction
Rex treats prediction as fuel for action, not a number on a dashboard. It scores every open invoice across the ledger by how likely it is to pay late and acts on that score continuously, starting tailored outreach on the accounts heading for trouble before they cross the due date. Because Rex works the whole book at once, prediction reaches the small invoices a human team would never have time to get ahead of, and it adjusts each account's cadence as the customer responds.
When a prediction is wrong in a way that needs judgment, a customer who suddenly stops paying after years of being reliable, Rex escalates that account to a person rather than guessing. The model sets priority, Rex does the collecting, and a human handles the genuine exceptions.
See how Rex turns payment predictions into recovered cash across your whole ledger.
Frequently asked questions
- What is payment prediction in accounts receivable?
- Payment prediction uses machine learning to estimate when an invoice will actually be paid, not just when it is due. The model learns from a customer's past payment behavior and invoice attributes to flag which open invoices are likely to pay late, so collectors can act before the due date instead of after.
- What data does a payment prediction model use?
- The strongest signals are a customer's own payment history, the average days they run past terms, invoice size, the time of month, disputes or short pays on the account, and how they responded to past reminders. Generic credit scores add context, but a customer's behavior on your ledger predicts their next payment far better.
- How accurate is machine learning payment prediction?
- On a ledger with enough history, models commonly land within a few days of the actual payment date for the majority of invoices. Accuracy is highest for repeat customers with stable patterns and lowest for new accounts. Models drift as customer behavior changes, so they need periodic retraining to stay sharp.