runbookify
← All plans
Procurement & Purchasing / 3-Way Match & AP Handoff

Duplicate Invoice Detector: Catch the Double-Pay Before You Pay

Check every incoming invoice against your paid-and-received history for exact and fuzzy duplicates — resends, re-keyed PDFs, transposed invoice numbers — and hold the suspects for an AP reviewer to clear or block before payment.

BeginnerAn afternoonBuilds onNext.jsSupabaseResend
What you'll build

A web tool where you load your invoice history, every new invoice is checked for exact and fuzzy duplicates, clean ones pass through, suspects are held and shown side-by-side with the invoice they match, an AP reviewer clears or blocks each one, every decision is logged, and you export the cleared and blocked lists as CSV.

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 Supabase account (free)
  • A Vercel account (free)
  • A Resend account (free)
  • A CSV of your prior invoice history
  • A way to feed in new invoices (CSV, or one-at-a-time entry)
  • Claude Code or any AI coding agent

The problem this kills

A supplier emails an invoice, then re-sends it a week later "just to follow up." It also comes in through your AP inbox and through the vendor portal. Someone keys it once; someone else keys it again with a leading zero dropped or two digits flipped in the invoice number. Three weeks later you've paid the same bill twice, and now you're chasing a refund from a vendor who's in no hurry to give it back.

Double-payments are quietly expensive and embarrassingly common. They slip through because the duplicate rarely looks identical — it's the same money under a slightly different invoice number, or the same number under a slightly different amount, or a clean re-send that nobody remembers seeing the first time. Catching them by eyeball doesn't scale, and your accounting system's "duplicate" warning only fires on an exact match. You don't need a developer to fix this — you can build the safety net yourself.

What you'll build

A simple internal web tool that sits between your invoices and your payment run. You load your invoice history (everything already received or paid). Then, for every new invoice — supplier, invoice number, date, amount, PO — the tool runs two passes: an exact check (same supplier + normalized invoice number) and a fuzzy check (same supplier + same amount + near date, transposed or re-keyed numbers, a re-sent PDF). Clean invoices pass straight through. Anything suspicious is held and shown to your reviewer side-by-side with the invoice it matched, with a plain-language reason ("same supplier and amount, invoice number is the other one's digits transposed"). Your AP reviewer clears it (not a duplicate — release it) or blocks it (true duplicate — stop the payment). Every decision is logged, and you export the cleared and blocked lists as CSV for your AP system.

What's inside the Implementation Plan

The downloadable plan is a step-by-step file you paste into an AI coding agent. It opens by interviewing you about your business — which system your invoices come from, exactly how your supplier names and invoice numbers are formatted, whether numbers carry prefixes or leading zeros, your typical and peak invoice volumes, how you tell a credit note from an invoice, and the messy resend-and-re-key cases that actually bite you — and then it tailors the normalization rules, the match logic, and every later step to your answers. This is not a generic template; the agent reads a short spec back to you and waits for your thumbs-up before it builds anything. From there it walks the agent through loading your history, the exact and fuzzy matching, the side-by-side hold-and-review screen, the clear/block decision, the audit trail, and the CSV export — each step with a ready-to-copy prompt. There's also a fallback so you can build and run the whole thing today with no integration to your accounting system at all.

The governance it includes (this is the point)

This tool stands directly in front of money leaving the building, so it ships with the controls AP needs: login so only your team can use it, row-level security so you only ever see your own organization's invoices, a complete audit trail of who cleared or blocked which invoice and why and when, and a hard human-in-the-loop gate so no held invoice ever proceeds to payment until a reviewer decides. And because the whole tool is itself a duplicate guard, it's built so the same invoice can't be loaded — or cleared — twice by accident.

Who it's for

AP clerks, AP managers, and controllers who've been burned by a double-payment and want a real net under the payment run — especially teams where invoices arrive through more than one channel and suppliers love to "resend." If you can describe how your invoice numbers and supplier names are written, you can build this.

You've got this — start with the plan, paste the first prompt, answer the interview, and you'll watch your first suspected duplicate get caught the same afternoon.

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.