Skip to main content
This guide uses the QuotaMint dashboard and runtime API together. It ends with one consume request that is safe to retry.

Before you begin

You need:
  • A QuotaMint workspace and project
  • A test API key (qm_test_...)
  • A customer with an active plan
  • A feature entitled by that plan
  • The runtime base URL from Developers in the dashboard

1. Create a project

Create a project in the dashboard. Keep separate projects when test and live balances must never mix. A project owns its customers, plans, features, API keys, and usage. Open Settings → Projects to confirm the project slug and default environment.

2. Add a plan and feature

Create a plan such as pro and give it a monthly credit allocation. Then create a metered feature:
  • Key: generate_image
  • Type: CREDIT
  • Credit cost: 10
Add the feature to the pro entitlement matrix. A customer can only consume an active feature on an active plan.

3. Create a customer and assign the plan

Customers are identified by your own stable ID. Create the customer in the dashboard and assign the pro plan. Example IDs are opaque strings such as user_123 or org_acme.

4. Create a test key

Open API keys, choose Test, and create a key. Copy the secret immediately; QuotaMint returns it once and does not store the plaintext.
Never ship a test or live key to a browser bundle. Send runtime requests from your server.

5. Check without changing anything

check is useful for previews and UI hints. It does not reserve or consume credits.

6. Consume atomically

Call consume immediately before the billable work. The idempotency key should identify the business operation, not the HTTP attempt.
If the call is retried with the same key and payload, QuotaMint returns the original response without charging again. Read idempotency before adding retry middleware.
QuotaMint exposes a plain REST API — there is no SDK to install. See calling QuotaMint from any language for copyable request patterns in eight backend languages.
Do not use check followed by consume as an authorization transaction. Another request can spend the balance between the two calls. consume is the authoritative decision.

Next steps

Integrate from any language

Node.js, Python, Go, Java, PHP, Ruby, C#, and Rust working against the same REST contract.

Sync billing changes

Keep Stripe, Razorpay, or another billing provider as the source of payment truth.

Handle retries

Choose stable keys and understand replay and conflict behavior.

Track non-credit usage

Record tokens, seconds, documents, or other project-defined metrics.

Go live safely

Separate keys, add a denial path to your product.