Commission Clawback & Chargeback Tracker
Build an internal tool that watches paid-commission deals for clawback triggers — cancellation, refund, non-payment, churn inside the window — proposes the exact recovery amount, routes it through a finance approval gate, and applies it to the next commission run with a full audit trail.
A login-protected app that matches refund/churn/cancellation events to already-paid commissions inside the clawback window, computes the correct recovery, lets finance review and approve each one, applies approved clawbacks to the next run, notifies reps, and exports a clean clawback CSV plus a tamper-evident audit log.
Before you start
- A free Vercel account
- A free Supabase account
- A free Resend account (or skip email for now)
- Your paid-commission history (deal, rep, amount paid, paid date) as a Google Sheet or CSV
- Your churn / refund / cancellation events as a Google Sheet or CSV
- Your written clawback rules: window length, % recovered, pro-ration, and exceptions
The problem this kills
You paid commission on a deal. Then the customer churned three weeks later, asked for a refund, or never actually paid the invoice. By your contract that commission should come back — but nobody's watching. The refund lands in one system, the commission lives in another, and the two never get compared. So the clawback quietly never happens, or it surfaces months later in a tense one-on-one where the rep insists they were never told.
Most teams "track clawbacks" in a spreadsheet that one person babysits. It misses events, it double-counts, it has no proof of why a number changed, and it turns into an argument every quarter-end. Finance loses real money. Sales ops loses trust.
This tool closes the loop. Every refund, cancellation, and churn event gets checked against what you already paid — automatically, inside the window you actually contracted for, with the math shown and a person signing off before a single dollar is reversed.
What you'll build
A small, private web app for your finance and sales-ops team:
- Import your paid-commission history and your refund/churn/cancellation feed (from a Google Sheet or CSV — no integration required to start).
- Match each trigger event to the commission deal it belongs to, and check whether it falls inside the clawback window.
- Compute the clawback amount using your real rules — percentage recovered, pro-ration by time remaining, and any exceptions you define.
- Review every proposed clawback in a queue: finance sees the triggering event, the original payout, and the calculated recovery side by side.
- Approve (the human gate) so nothing is reversed automatically — finance signs off, and only then is it staged for the next run.
- Notify reps when a clawback is approved, with a built-in dispute path so disagreements happen in the tool, not in a hallway.
- Export the approved clawbacks as a CSV in the exact columns your payroll/commission system expects, plus a full audit log.
What's inside the Implementation Plan
The plan is a single file you paste into an AI coding agent (Claude Code). It does the building; you steer.
It opens by interviewing you about your business — your commission process, the systems and spreadsheets you use, the exact field names in your data, your clawback window and pro-ration rules, your typical and peak volumes, and your messy edge cases (partial refunds, deals split across reps, ex-employees). It reads a short tailored spec back to you and waits for your thumbs-up before building anything, so you get a tool shaped around your actual rules — not a generic template you have to bend to fit.
From there it walks the agent through, step by step, with a ready-to-paste prompt at the end of each one:
- Setting up the app, database, and login.
- Building the data model and importers tuned to your field names.
- The matching engine (event → paid deal, inside the window).
- The clawback math (percentage, pro-ration, exceptions).
- The finance review-and-approve queue with the hard human gate.
- Rep notifications and the dispute workflow.
- The CSV export and the audit log.
- A verification checklist so you can prove it works.
The governance it includes (this is the point)
This isn't a loose spreadsheet replacement. The plan bakes in the controls finance actually needs:
- Login so only your team can open the tool.
- Row-level security so each organization only ever sees its own data.
- A complete audit trail — who imported what, who approved which clawback, what the amount was, and exactly which event triggered it.
- A hard human-in-the-loop approval gate: the tool drafts every clawback; a person reviews and approves before anything is staged for a commission run. Nothing reverses itself.
- Duplicate guards keyed on deal + trigger event, so the same clawback can never be applied twice — even if the event arrives in two imports.
- Window discipline: nothing outside the contracted clawback window is ever proposed.
Who it's for
Finance and sales-ops people who keep money and keep the peace — the ones who currently miss clawbacks, or fight about them after the fact. If you can write down your clawback rules and you can paste text into a chat box, you can build this. You don't need to be a developer.
You've got this — paste the first prompt and let the plan interview you.