CreditKit ships the part nobody else does. A real credits system, usage metering, and a worker that refunds the user when a job fails.
One time. Full source, yours forever.
AI features cost you real money per call, so a flat price falls apart the first time a heavy user shows up. You have to sell credits. And credits bite you every time.
Two requests land at once and the balance goes negative. You gave work away for free.
Stripe retries a webhook and the same purchase grants credits twice.
A job dies after you charged, and the user is out money and emailing you.
Stripe credit packs or subscriptions.
One Postgres update that can't go negative, even under load.
A background queue picks it up and processes it.
If the job fails, the credits go back automatically.
Not a demo. The code that already runs my own paying apps.
Atomic and idempotent. Every change logged.
Credit packs and subscriptions, webhook-driven.
Job dies, credits come back.
Email-code login, no resets.
Every row locked to its owner.
Balance, history, packs.
Resend, already wired.
Next.js 15, Supabase, Stripe, Tailwind.
"I didn't build this once to sell it. I shipped 10+ real, paying apps on this exact code, then pulled it out and cleaned it up. You're buying something that already survived real users and real Stripe webhooks at 2am."
One time. Full source, yours forever.
Get CreditKit