Buy credits → D1 ledger → debit on use · v1.0.0
Results appear here.
POST /api/checkout — one-time Checkout Session for a credit packPOST /api/credits/debit — idempotent debit (402 if insufficient)GET /api/credits?email= — balance + recent ledgerPOST /api/webhook — Stripe webhooks (SubtleCrypto); credits on checkout.session.completedGET /api/health — JSON health (secret flags only)GET /api/admin/ledger — recent rows (X-Admin-Secret)Different buyer problem than Metered Pack (subscription usage). Prepaid: pay → balance → deduct. Add-on to Billflare spine ($99).