Questions people ask
Why not just use Stripe Billing?
Its pay-as-you-go plan takes 0.7% of what you bill. Its basic usage-based billing has no dimensional pricing, so each model and token type needs its own meter; Stripe’s docs point you to Metronome for that. Hardcount does the billing itself. For simple per-seat pricing paid by card, Stripe Billing is the better choice: there is nothing to run.
Why run it myself?
Your billing data stays in your own Postgres, there is no fee on what you bill, and it is one server program plus Postgres and Redis. There is no cloud version.
What does it cost?
Hardcount is free. Your costs are your server and Stripe’s card fee. Pricing →
Is it safe for real money?
No one runs it in production yet. The payment, credit and invoice code is tested against a real Postgres database, and what isn’t handled yet is written down. Try it in test mode before you trust it with real customers.
What if Hardcount goes down?
Billing waits until it is back, and invoices due in the meantime are made on its next run. Usage your app sends while it is down fails: send it again with the same idempotency key (your own unique ID for the event) and it is counted once. LiteLLM retries for a while and then drops usage it could not deliver. If your app checks the live credit balance before serving a customer, decide what it does when Hardcount does not answer. LiteLLM after an outage →
Am I locked in?
No. It is MIT-licensed, your data is in your own Postgres, and the API exports invoices, customers, subscriptions, usage events and the audit log as CSV.
Who is behind it, and what if the maintainer stops?
One maintainer, Sagar Waidande. Hardcount is MIT-licensed and your data is in your own Postgres, so you can keep running the release you have, or fork it.
What does it connect to?
Usage comes in through the REST API or a LiteLLM proxy. Out go Stripe card payments (with retries, refunds and disputes), Stripe Tax or a flat tax rate you set, signed webhooks, email through any SMTP server, PDF invoices with a hosted invoice page, and CSV exports. Not built yet: other payment processors, accounting sync such as QuickBooks or Xero, and CRM sync.
Can I move from Stripe Billing or Lago?
There is no migration guide yet. A tool for moving from Stripe Billing is on the roadmap under “Later”.
Another question? Ask in GitHub Discussions or email the maintainer.
Try it on your computer
Start Hardcount in test mode and run its demo. Found something rough? Open an issue or a Discussion.