Ledger
Your operational record of authorizations, charges, and claims — in your own database.
Pre-release · planned API
The ledger is the merchant's operational record. The payment network or provider is the final authority on whether money moved; reconciliation keeps the two in agreement.
| Record | Purpose |
|---|---|
| Authorizations | What each payer authorized, with limit, reserved, and consumed amounts |
| Charges | Each economic effect, with payment and fulfillment states |
| Transitions | Every state change, for audit |
| Claims | Single-use keys such as nonces |
Guarantees a ledger must provide
createChargereserves capacity atomically and refuses a second charge on a single-use authorization that was not released.transitionChargeis compare-and-set on both axes and updates reserved and consumed amounts in the same step.- Amounts are integers. Nothing is stored as a float.
Ledgers
| Ledger | Status |
|---|---|
memoryLedger() | Implemented — tests and local development |
@tollstile/postgres | In development — bring your own client (pg, postgres.js, Neon, PGlite) |
@tollstile/sqlite | In development — node:sqlite, better-sqlite3, bun:sqlite, D1 |
There is no Tollstile account, no required dashboard, and no telemetry.