AI Credits Billing Kit
$29 paid source kit
A focused Node starter for selling AI usage credits with Stripe credit packs, token estimates, reservation holds before model calls, finalized usage charges, unused-credit refunds, failed-call voids, insufficient-credit checks, and duplicate-safe credit ledgers.
Included
- Per-model credit estimation from token counts and flat-cost jobs.
- Signed Stripe credit-pack grants with duplicate webhook protection.
- Reserve, finalize, void, and refund flows around each model request.
- Insufficient-credit rejection before expensive model calls start.
- Unused-credit refunds when actual usage is lower than reserved.
- Tests for duplicate webhooks, insufficient credit, voids, and buyer smoke.
Best fit
Use it when your app already has users and AI features, but still needs a small credit ledger for paid credit packs, token or job estimates, failed calls, cancelled streams, duplicate webhooks, insufficient-credit rejects, and post-call balance adjustments.
Base USDC Order
Send 29 USDC on Base to
0xFF5af6e1c73904FF36754377A3069812E706323E, then email
agentlaunchops@proton.me with the transaction hash and
the subject above for delivery.
Buyer Check
The archive includes MANIFEST.txt. Run
npm run verify:manifest, npm test, and
npm run smoke:buyer after unzipping.