How Billing Works
Quota uses dollar-denominated balances. Users see real dollar amounts, not abstract credits.
Balance Basics
- Balances are in US dollars (e.g., "$8.50 remaining")
- Costs are deducted automatically in dollars when you make API calls
- Your balance cannot go negative — requests return 402 at zero
- Balance never expires
Purchase Packages
Users buy balance in tiered packages. Larger packages get a better rate because Stripe's fixed fees are spread over a bigger purchase:
| Package | Price | Balance You Get | Effective Rate |
|---|---|---|---|
| Starter | $5.00 | $4.05 | 19% markup |
| Basic | $10.00 | $8.50 | 15% markup |
| Plus | $25.00 | $22.50 | 10% markup |
| Pro | $50.00 | $46.50 | 8% markup |
Cost Calculation
Costs are calculated based on token usage, which varies by model. The base cost is determined by Quota's pricing table. If the developer's app has a markup percentage set, the user pays the base cost plus the markup:
effective_cost = base_cost * (1 + developer_markup_percentage)See the pricing page for current per-model rates.
Checking Your Balance
You can check your balance at any time:
curl -H "Authorization: Bearer $QUOTA_API_KEY" \
https://api.usequota.ai/v1/balancePurchasing Balance
Buy balance via Stripe checkout. The flow has two steps:
1. List available packages
curl https://api.usequota.ai/v1/packagesResponse (no auth required):
{
"packages": [
{ "id": "starter", "name": "Starter", "price_cents": 500, "balance_display": "$4.05" },
{ "id": "basic", "name": "Basic", "price_cents": 1000, "balance_display": "$8.50" },
{ "id": "plus", "name": "Plus", "price_cents": 2500, "balance_display": "$22.50" },
{ "id": "pro", "name": "Pro", "price_cents": 5000, "balance_display": "$46.50" }
]
}2. Create a checkout session
curl -X POST https://api.usequota.ai/api/payments/checkout \
-H "Authorization: Bearer $QUOTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"package_id": "basic",
"success_url": "https://yourapp.com/success",
"cancel_url": "https://yourapp.com/cancel"
}'Response:
{
"checkout_url": "https://checkout.stripe.com/...",
"session_id": "cs_..."
}Redirect the user to checkout_url. After payment, Stripe sends a webhook and balance is added to the account automatically.
Transaction History
Every transaction is recorded in an immutable ledger. Use the Analytics API to query your usage, revenue, and cost breakdown.
Developer Markup
Developers set a markup percentage on their app. Users pay the base cost plus the developer's markup. Developers keep 100% of their markup — no platform fee. Payouts are sent via Stripe Connect daily (with a 7-day delay for chargeback protection).