Credits and billing
Prepaid credit, drawn down per request, exact to the micro-dollar — and the ledger that records every movement.
There is no subscription and no invoice at the end of the month. You hold a balance, and each request draws down what it cost.
The ledger
credit_ledger is append-only and is the truth. The balance shown on
Billing is its running total, updated in the same transaction as the
entry that moved it — the two cannot drift apart.
Four kinds of movement:
| Kind | Sign | What it is |
|---|---|---|
topup |
+ | Credit bought, by card or stablecoin |
spend |
− | Requests, metered as they finish |
refund |
+ | Credit returned |
adjustment |
± | Anything applied by hand |
Micro-dollars
Amounts are integers in millionths of a dollar. 1_000_000 is one dollar.
Nothing about money goes through a floating-point number at any point, because
0.1 + 0.2 is not 0.3 and a balance is not the place to discover that.
A figure is only converted to dollars when it is about to be shown, and it truncates rather than rounds — showing more credit than is held is the wrong direction to be wrong in.
Topping up
Two rails, one ledger:
- Card, through Stripe Checkout. The card can be saved for one-click top-ups and for auto-reload.
- Stablecoin, through Trails. Pay in USDC on a supported chain; the credit lands once the payment settles.
Both write the same kind of ledger entry, so a balance is a balance regardless of how it got there.
Currency
Credit is held in dollars. The billing screen can present it in another currency, priced at the rate the credit was actually bought at rather than today's — a balance you have not touched should not move because a rate did.