Recommended request flow
When to use each surface
Do not put QuotaMint in the browser
Project API keys identify a project and can spend credits. Keep them on your server. Your frontend can call your own backend, and your backend can call QuotaMint. Return only the decision and information your UI needs.Billing-provider example
When a Stripe or Razorpay subscription becomes active:- Verify the provider webhook signature.
- Map the provider price or plan to a QuotaMint plan key.
- Assign the plan to the customer in the dashboard (or automate this step in your billing workflow).
- Add any separately purchased credits from the customer’s dashboard page.
Choosing a credit model
Use a credit feature when several resources share one allowance:generate_imagecosts 10 creditsgenerate_videocosts 50 creditsrun_agentcosts 3 credits
events when you need a usage meter that does not affect the balance, such as tokens, seconds, or documents. You can use both for the same product action if you need a charge and an analytical event.