Skip to content

Insufficient credits

FieldValue
Type URIhttps://echo.labstack.com/pro/problems/insufficient-credits
Codeinsufficient_credits
HTTP status402
HTTP statusEnglish title
402Request cannot be satisfied as prepaid credits are insufficient

The prepaid credit balance does not cover the request’s cost.

Add credits or reduce the request’s cost before retrying. An unchanged request remains refused while its cost exceeds the available balance. violated-policies names the credits limit.

If your application installs a custom handler, the body may differ.

HTTP/1.1 402 Payment Required
Content-Type: application/problem+json
{
"code": "insufficient_credits",
"status": 402,
"title": "Request cannot be satisfied as prepaid credits are insufficient",
"type": "https://echo.labstack.com/pro/problems/insufficient-credits",
"violated-policies": [
"requests"
]
}

Check the verified tenant, selected plan and credit meter before adding funds. Reuse a credit adjustment ID only with its original amount.

  • code (string, always): The stable code above.
  • type (string, always): The exact type URI above.
  • title (string, always): English title. Quota administration routes use their own titles for some codes.
  • status (integer, always): The HTTP status of the response.
  • detail (string, optional): Human-readable explanation, omitted when empty. Its wording is not a stable format.
  • violated-policies (array, always): IDs of the limits involved: [] when there are none, never null.

Headers:

  • RateLimit-Policy, RateLimit (conditional): Draft-11 rate-limit fields. The middleware sends them when Headers is Draft11 (the default) or Draft11AndLegacy. It skips them when the plan has no limit to report. UsageHandler never sends them.
  • X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (conditional): Legacy rate-limit fields, sent by the middleware when Headers is Legacy or Draft11AndLegacy.

See quota for plans, credit adjustments and usage.