runbookify
← All plans
Order Management & Fulfillment / Invoicing & Billing

Invoice Sales-Tax Sanity Checker

Build an internal tool that checks every invoice's sales tax against your rules and customer exemption certificates, flags missing exemptions, wrong rates, and expired certs, and routes corrections to a tax reviewer for sign-off before invoices are finalized.

IntermediateA weekendBuilds onNext.js (App Router) on VercelSupabase (Postgres, Storage, Auth, RLS)Resend (email alerts + digests)
What you'll build

A team-only web app where you import an invoice batch, automatically check the tax rate and exemption status for each ship-to, see flagged anomalies (missing exemption, wrong rate, expired cert), have a tax reviewer approve corrections, and export a clean corrected invoice list ready for your billing system.

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 Vercel account
  • A free Resend account
  • An invoice-lines export (CSV) and a tax-rules + exemption-cert list (CSV/Sheet)

The problem this kills

Sales tax goes wrong quietly. A customer who is supposed to be tax-exempt gets charged anyway. A ship-to in the wrong jurisdiction gets the old rate. An exemption certificate expired three months ago and nobody noticed, so you keep honoring it. None of these show up until an auditor, a customer dispute, or a refund request drags them into the light.

The usual "fix" is one person eyeballing a sample of invoices in a spreadsheet, hoping the weird ones float to the top. They don't. The bad invoice is the one that looks exactly like a normal invoice except for one field. Manual spot-checks miss it, and every miss is either money you over-collected (a refund and a hit to trust) or under-collected (a liability that grows with interest and penalties).

This tool checks every invoice line against your actual rules and your actual certificate library, every time, and surfaces only the ones that need a human. The tax stops being mis-applied, and you get a defensible paper trail showing you checked.

What you'll build

A small, private web app your AR, tax, and billing team logs into. You import a batch of invoice lines (a CSV export from your billing system) and a list of tax rules and customer exemption certificates with expiry dates. The app then, for each invoice line:

  • Looks up the expected tax treatment for that ship-to location.
  • Compares the tax actually charged on the invoice against the expected rate.
  • Checks whether the customer has a valid exemption certificate for that ship-to - and whether it is still in date.
  • Flags anomalies: tax charged when the customer is exempt, a missing or expired certificate, a wrong rate, or a jurisdiction it can't resolve.

Every flagged line lands in a review queue. A tax reviewer opens each one, sees the proposed correction in plain language, and approves or rejects it. Only approved corrections make it into the final export. Then you download a clean, corrected invoice list in exactly the columns your billing system expects.

What's inside the Implementation Plan

The plan is a single file you paste into Claude Code (a free AI coding tool). It builds the whole app step by step, and each step ends with a ready-to-copy prompt.

It opens by interviewing you about your business. Before it writes a line of code, the plan makes the AI agent ask you about your current tax-check process, the systems and spreadsheets you use, exactly how your invoice and certificate data is shaped and named, your typical and peak invoice volumes, your specific rate and exemption rules, and your messiest edge cases. It reflects a short tailored spec back to you for a thumbs-up, then shapes the data model, the validations, and every later build step around your answers. You get a tool tuned to your business, not a generic template you have to bend to fit.

Inside you'll find:

  • The discovery interview and how the agent turns your answers into a spec.
  • A data model for invoice lines, tax rules, exemption certificates, and the review/audit log.
  • The import flow for both CSVs, with a duplicate guard keyed on invoice number.
  • The checking engine: rate comparison, exemption lookup, and certificate-expiry logic.
  • The reviewer queue and the human approval gate.
  • Email alerts to the right person when high-value or high-risk anomalies appear.
  • The clean corrected-list CSV export in your billing system's column layout.

The governance it includes (this is the point)

This is not a script that quietly edits your invoices. It is a controlled, auditable workflow, because tax is exactly where "the computer did it" is not an acceptable answer:

  • Login so only your team can open the tool.
  • Row-level security so each person only ever sees their own organization's data.
  • A complete audit trail - who imported what, who reviewed it, what they approved or rejected, and when.
  • A hard human-in-the-loop approval gate - the AI drafts the correction; a tax reviewer must approve it before it can appear in the final export. Nothing is finalized automatically.
  • Duplicate guards keyed on invoice number, so the same invoice can't be processed or corrected twice.

Who it's for

Accounts receivable, tax and compliance, and billing teams who finalize invoices and carry the risk when sales tax is wrong. If you live in invoice exports and exemption-certificate folders and you've ever been surprised in an audit, this is for you. You do not need to be a developer.

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.