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

FieldTypeDescription
external_user_idstringYour unique identifier for the user
amountintegerCredits to add (positive integer)
idempotency_keystringOptional. 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"
}