Skip to content
AutomationSource available

settle: payments matched to invoices automatically

Matches incoming payments to invoices automatically. Clear matches are handled by fixed rules, and anything uncertain goes to a person to check.

A settle run on sample data: payments matched, the amount allocated, and the payments left for a person to check

The challenge

For every payment that reaches the bank account, someone has to work out which invoices it paid. One transfer covers three invoices, a customer pays part now and the rest later, a bank takes a fee on the way, and the reference says whatever the customer typed. Two invoices for the same customer can have the same amount on the same day.

What we built

A Python engine that handles exact matches, one payment for several invoices, part payments, overpayments and bank fees by fixed rules. Every match comes with a confidence score and a plain reason. An optional AI model only reads messy payment references and suggests invoices; the engine checks each suggestion against the open invoices, and anything uncertain goes to a review list instead of being guessed. At the end of every run, the engine checks that no money was lost or counted twice, and discards the result if it was. A browser app adds column mapping for CSV exports from accounting software, a run history and a password.

Project facts

Type
Our own product, source available (PolyForm Noncommercial)
Technology
  • Python
  • FastAPI
  • Pydantic
  • Hypothesis
  • SQLite
  • Claude API (optional)

Result

Version 0.1.0 published on GitHub: github.com/nagytamasgit/settle. On generated test data with heavy noise, more than 97% of the matches it makes are correct; what it can't decide goes to a person.

Automation & AIAutomations and AI that save your team time

Building something like this?

Describe it in a short form. You'll get a written plan and a fixed quote first.

Get a quote