bootstrap-credits
Installation
SKILL.md
Bootstrap Credits with Stripe
Add a complete prepaid credit system with Stripe payment integration to a Phoenix 1.8 app.
What Gets Created
- Credit Balances — Per-account balance with optimistic locking
- Credit Transactions — Immutable append-only ledger (deductions, additions, adjustments)
- Usage Events — Per-operation tracking with cost, cache status, metadata
- Billing — Credit pack configuration, Stripe PaymentIntent creation, customer lifecycle
- Stripe Webhook — Signature verification, event routing, idempotent credit fulfillment
- PgFlow Job — Async credit fulfillment with deduplication
- LiveView Pages — Purchase page with Stripe Payment Element, balance/history page
- JS Hook — Stripe.js lazy-loading and Payment Element mounting