runbookify
← All plans
Order Management & Fulfillment / Cash Application & Payment Reconciliation

Cash Application Matcher

Import a payments/deposits file and your open-invoices (AR) file, auto-match cash to invoices - including one payment covering many invoices and partial / short-pays - then post the applications only after an AR reviewer signs off. Incoming cash stops sitting unapplied and your AR stays clean.

IntermediateA weekendBuilds onNext.js (App Router) on VercelSupabase (Postgres, Auth, RLS, Storage)Resend (review-ready and exception notifications)
What you'll build

Import a payments file and an open-AR file, auto-match cash to invoices (handling lump sums and partials), have an AR reviewer approve the proposed matches, then post the applied cash and export a clean applied-cash CSV plus an exceptions list - with a full audit trail and a duplicate guard on payment reference.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.

Before you start

  • A free Supabase account
  • A free Resend account with one verified sending domain
  • A Vercel account for deploy (optional while building)
  • A payments / deposits export (CSV) - from your bank, lockbox, or payment processor
  • An open-invoices (AR) export (CSV) from your accounting system - QuickBooks, Xero, NetSuite, Sage, or a spreadsheet

The problem this kills

Cash lands in the bank but never lands on an invoice. A customer pays one lump sum that covers seven invoices, another short-pays by $12 because of a freight dispute, and a third wires a round number that matches nothing on the books. So payments sit in an "unapplied cash" pile, the AR aging looks worse than reality, collectors chase customers who already paid, and month-end close drags while someone squints at a bank statement next to a stack of remittance emails.

The matching itself is mostly mechanical - amount equals invoice, reference number names the invoice, customer plus total lines up - but it's slow, fiddly, and easy to get wrong. And one fat-fingered application against the wrong invoice is a mess to unwind.

What you'll build

A small internal web app that takes your payments/deposits file and your open-invoices (AR) file and automatically proposes how each payment should be applied. It matches on the obvious signals - exact amount, invoice number in the payment reference, customer plus running total - and it handles the two cases that break simple tools: one payment covering many invoices (a lump sum it splits across the right invoices) and partial payments / short-pays (where the cash is less than the invoice and you decide whether to apply-on-account, hold the balance open, or flag a deduction).

Then it stops and waits for a person. An AR clerk or controller opens the proposed matches, sees the confidence behind each one, fixes or reassigns anything that looks off - especially the partials and short-pays - and approves. Only then does the tool post the applications, produce a clean applied-cash CSV to feed your accounting system, and drop everything it couldn't confidently match onto an exceptions list for follow-up. Re-import the same bank file tomorrow and nothing double-applies, because every payment is keyed on its reference.

What's inside the Implementation Plan

The plan is a single file you paste into Claude Code (an AI coding agent), and it builds the tool with you step by step. It opens by interviewing you about your business - the exact columns in your payments and AR files, how your customer and invoice numbers are formatted, where the remittance detail lives, your tolerance for short-pays, and your rules for partials and on-account cash - so the matcher is tuned to how you actually get paid, not a generic template. You confirm a short spec before anything gets built.

Inside you'll find:

  • The discovery interview and the tailored spec it produces
  • A data model for payments, open invoices, proposed matches, and an applied-cash log built around your real fields
  • Auto-matching logic for exact, reference-based, and customer-total matches - including lump sums split across many invoices and partial / short-pay handling
  • The AR review-and-approve screen (the human gate), with the proposed match and a confidence reason for every payment
  • An applied-cash CSV export in your system's exact columns, plus an exceptions list for the ones to chase
  • A dedupe guard keyed on payment reference so the same deposit can never be applied twice
  • A no-API fallback so you can run the whole thing today from a Google Sheet or CSV

The governance it includes (this is the point)

This isn't a "post whatever matches" script. It's built like an internal tool a controller can trust:

  • Login so only your team can use it.
  • Row-level security so each organization only ever sees its own payments and invoices.
  • A human-in-the-loop approval gate - the tool drafts the matches, an AR reviewer approves them (especially partials and short-pays), and only then does anything post or export. Nothing touches your system of record without a person saying yes.
  • A complete audit trail - who imported, what was matched and why, who edited, who approved, and when.
  • A duplicate guard keyed on payment reference, so the same payment can never be applied twice even if you import the bank file twice.

Who it's for

AR clerks, cash application specialists, and controllers who live in the unapplied-cash pile - anyone who needs incoming payments matched to invoices quickly and accurately, with partials handled sensibly and a human firmly in control before anything posts.

You've got this - paste the first prompt and let the agent interview you.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.