Credits API
Fund and manage credits for your app users.
Fund User Credits
POST /v1/funding/credit
Add credits to an app user's balance.
Request
curl https://api.usequota.app/v1/funding/credit \
-H "Authorization: Bearer sk-quota-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"external_user_id": "user_123",
"amount": 1000,
"idempotency_key": "funding-user123-jan2026"
}'Request Fields
| Field | Type | Description |
|---|---|---|
external_user_id | string | Your unique identifier for the user |
amount | integer | Credits to add (positive integer) |
idempotency_key | string | Optional. Prevents duplicate funding (valid for 24h) |
Response
{
"success": true,
"user_id": "user_123",
"new_balance": 1500,
"amount_added": 1000
}Check User Balance
GET /v1/users/:id/balance
Check an app user's credit balance.
Request
curl https://api.usequota.app/v1/users/user_123/balance \
-H "Authorization: Bearer sk-quota-your-api-key"Response
{
"user_id": "user_123",
"balance": 1500,
"currency": "credits"
}