Skip to main content
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 returns 200 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 allowed is true.
  • Retry transient 500, 503, and network failures with the same idempotency key.
  • Treat allowed: false as a normal product outcome and show an upgrade, top-up, or retry message appropriate to the reason.