quotastack Docs
Docs / API / Errors / insufficient-credits
409

Insufficient credits

https://api.quotastack.io/errors/insufficient-credits

The customer did not have enough credits for this charge. QuotaStack charged nothing.

Why it happened

  • The balance is below what the call costs.
  • An open reservation is holding credits, so effective_balance is lower than balance.
  • A block that would pay for this starts later, through stack_after.
  • Your overage policy is block, which is what a new account starts with.

How to fix it

  1. Read effective_balance, not balance. That is what a new charge can spend.
  2. Grant or sell more credits, then send the call again.
  3. Listen for credit.low_balance, so you can tell the customer before this happens.
  4. Set your overage policy to allow or notify, and QuotaStack will note the gap instead.
Example response 409
{
  "type": "https://api.quotastack.io/errors/insufficient-credits",
  "title": "Insufficient Credits",
  "status": 409,
  "detail": "Customer has insufficient credits for this operation."
}

Which calls return this