← Back to docs
Q
60-Second Tour
1 / 10
01

Credits

Think of credits like layered deposits in a bank account. Each deposit (credit block) has its own terms — when it expires, whether it burns first, where it came from. The balance is just the sum of what's left in each deposit.

SOURCE Plan / Topup / Promo CREATES Credit Block UPDATES Account Balance CONSUMED BY Usage Events EVERY STEP RECORDS TO Append-Only Ledger
Read the full concept
02

Entitlements

An entitlement check is the bouncer at the door. Before your app starts an expensive operation, it asks QuotaStack "can this customer afford this?" — answer comes back in milliseconds, cached and ready.

Check Request Has feature? Yes No Balance > 0? Yes No allowed: true allowed: false allowed: false
Read the full concept
03

Metering

Metering is the bridge between "something happened" and "credits got spent". You define the price list (metering rules), report what happened (usage events), and QuotaStack does the math.

INGESTED Usage Event MATCHED TO Metric Rule APPLIES Cost Calculation flat per-unit tiered graduated RESULTS IN Credit Debit
Read the full concept
04

Reservations

Think of reservations like putting items in a hotel safe. The credits are held, not spent. When you're done: commit (you really used them), release (you didn't), or let the TTL auto-release so nothing leaks.

Reserve credits held Held success cancel timeout CREDITS CONSUMED Commit CREDITS RETURNED Release AUTO-RELEASED TTL Expiry
Read the full concept
05

Topups and Wallets

Wallets and credit packs are stacked fuel tanks with different rules. The system drains the tank that expires soonest first, saving the customer's paid wallet for last. You handle payment; QuotaStack grants the credits.

BURNS TOP → BOTTOM Trial credits P0 · expires Jan 15 Promo pack P0 · expires Mar 1 Plan grant P10 · expires Apr 1 Wallet balance P0 · never expires
Read the full concept
06

Subscriptions

Subscriptions are state machines for recurring billing. QuotaStack tracks the cycle and credits; you handle the payment. Prepaid: you drive renewal. Postpaid: QuotaStack auto-advances and sends you a usage summary.

STEP 1 Create STEP 2 Grant credits STEP 3 Renew STEP 4 Grant + rollover STEP 5 Cancel / expire
Read the full concept
07

Idempotency

Every POST/PATCH request includes a receipt number (the Idempotency-Key). Retry with the same key and QuotaStack returns the cached response, not a double-charge. This is how your system survives network failures and webhook re-deliveries.

WITHOUT POST /grant → 5,000 mc (timeout, retry...) POST /grant → 5,000 mc = 10,000 mc ✗ WITH IDEMPOTENCY-KEY POST /grant → 5,000 mc (timeout, retry...) POST /grant → cached = 5,000 mc ✓
Read the full concept
08

Webhooks

Webhooks are QuotaStack's postal service — they tell your app "something happened." Every delivery is signed (you know it's real), retried 7 times if you're offline, and ordered per-customer.

QuotaStack Your Server POST event verify HMAC timeout ✗ down retry (backoff) 200 OK ✓
Read the full concept
09

Customer Identification

Customers have two names: the one you already use (external_customer_id) and the one QuotaStack generates (customer_id UUID). Use either. Most apps only ever need the one they already have.

Read the full concept
10

API Conventions

Cross-cutting rules every endpoint inherits. API key prefix picks the environment. Pagination, errors, and rate limits all follow a single standard shape — learn it once, apply it everywhere.

Read the full concept
Use to navigate · Esc to exit