Spend-cap API
BetaLedgerCap enforces a prepaid credit limit in real time using a single atomic database write — the balance never overshoots, no matter how hard agents hammer the endpoint.
Currently in beta — join the waitlist.
API · https://api.ledgercap.dev/api/v1
Charge against your account — cents or nanodollars, your call
curl -sX POST https://api.ledgercap.dev/api/v1/charge \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"amountCents":0.5,"description":"gpt-4o call"}' # = $0.005
# {"allowed":true,"balanceNanos":4995000000,"ledgerId":"…"}
# (amountNanos:5000000 is identical — pick the unit that fits your model)Charge a SaaS user's card — offload the whole ledger
curl -sX POST https://api.ledgercap.dev/api/v1/charge \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"amountCents":0.5,
"externalId":"user_abc",
"createIfMissing":true}'
# {"allowed":true,"balanceNanos":995000000}
# card auto-provisioned on first call, no pre-registrationCheck the spend pool
curl -s https://api.ledgercap.dev/api/v1/balance \
-H "Authorization: Bearer $TOKEN"
# {"availableNanos":995000000,
# "spentTodayNanos":5000000,
# "dailyLimitNanos":1000000000}The second call is the offload story: same /charge endpoint, add externalId + createIfMissing: true and LedgerCap manages a separate balance, cap, and ledger for each of your end-users. No pre-provisioning step.