POST /v1/consume is the authoritative runtime decision. When it succeeds, QuotaMint deducts credits, writes a usage event, and appends a ledger row in one transaction.
Request
Allowed response
Denied response
A denied consume returns200 with the same decision shape as check and does not charge credits:
Atomicity
The runtime uses a conditional balance update. Concurrent requests cannot both spend the last available credit. The full path—idempotency claim, entitlement resolution, deduction, usage event, and ledger entry—commits or rolls back together.Client behavior
- Perform the call from your backend.
- Start billable work only when
allowedistrue. - Retry transient
500,503, and network failures with the same idempotency key. - Treat
allowed: falseas a normal product outcome and show an upgrade, top-up, or retry message appropriate to the reason.