One credit ledger
Grants, spends and refunds are append-only rows; the balance always reconciles to the ledger.
Exports, lookups, AI calls, render minutes — meter anything through one credit ledger. Plans grant credits each period, actions spend them, and every movement is a row you can audit.
SITE_PROFILE="credit-usage"one line picks this site typeGrants, spends and refunds are append-only rows; the balance always reconciles to the ledger.
A metered action commits its debit with the work it pays for, so a failed write can't silently consume credits.
Plans grant credits each period with top-up semantics — renewals and retries never double-grant.
Each action has a credit cost in config. Change pricing without touching the code that spends it.
Grant or deduct credits from the admin with a reason, recorded in the ledger and audit trail.
Balance and recent activity in the member dashboard, so nobody is surprised by a bill.
A plan grants its period's credits.
Each action checks the balance and spends its cost atomically.
Every grant, spend and refund is a ledger row.
The next period tops the balance back up.
Screenshots of the template running locally with sample data, on the house design. Switch SITE_DESIGN and the public pages wear any of the other designs.
SITE_PROFILE="credit-usage" STRIPE_SECRET_KEY="sk_live_…" STRIPE_WEBHOOK_SECRET="whsec_…" STRIPE_PRICE_STARTER_MONTHLY="price_…"
Copy the folder and run the installer — it creates the database and secrets.
php scripts/install.phpIt checks every key, extension and permission and names anything missing.
php scripts/doctor.phpNGINX + PHP on any small VPS, with the step-by-step deploy guide and nightly backups.
No. A spend checks and debits in one step, and an action without enough credits is refused.
The ledger supports any grant, but the shipped checkout grants credits through plans. One-off packs need a product mapped to a ledger grant — a small, testable addition.
Give the action a credit cost in config, then price your plans so credits cover your underlying costs.
Full source, every site type, the admin, the CMS, 43 designs and the deploy guides — £49, once. Unlimited own and client projects.