AI usage credits starter
AI credit billing for Node apps without rebuilding token metering from scratch.
Buy the AI Credits Billing Kit when you need credit packs, model-cost estimates, reservation holds, finalized usage refunds, and duplicate-safe consumption in a plain Node source package.
What the paid kit is for
Credit packs
Grant paid credits from Stripe events while keeping duplicate checkout and webhook deliveries from double-crediting an account.
Token-cost estimates
Estimate per-model usage from token counts and flat-cost jobs before reserving spend for an AI request.
Reservation refunds
Reserve credits before a run, finalize actual usage after the model call, and refund unused reserved credits back to the account balance.
Included source patterns
- Stripe credit-pack webhook handling with idempotent grant records.
- Per-model token pricing and flat-job pricing configuration.
- Reserve, finalize, and void flows for AI requests.
- Unused-credit refund logic when actual usage is lower than reserved usage.
- Usage event records for support, reconciliation, and account balance review.
- README, single-buyer license, manifest verification, tests, and buyer smoke command.
Checkout
$29 source kit
This is source code for your own application. You receive the kit through Gumroad, then configure your own Stripe account, model pricing, persistence, auth, hosting, secrets, operational limits, and production billing controls.