Browse

plan_limit error

plan_limit is returned with HTTP 402. Retryable: no. Sending the same request again returns the same error. Nothing is charged for this error.

What it means

The current plan does not allow this.

Most likely cause

The account has a plan, but the plan has no price for what was asked. The usual case is buying a top-up on a plan the top-up is not sold for.

How to fix it

Change to a plan that includes it, or reduce usage to stay within the plan, then retry.

Example

Checkout uses the signed-in dashboard session token, not an API key. A top-up for a plan without a top-up price returns HTTP 402. Change plan, then retry.

Terminal
curl -i -X POST https://YOUR_API_HOST/v1/me/billing/checkout -H "Authorization: Bearer $FIREBASE_ID_TOKEN" -H "Content-Type: application/json" -d '{"offer":"topup"}'

An error response is one JSON envelope. Branch on code, never on the message text. The message and fix of a real response can be more specific than the defaults shown here.

{
  "error": {
    "code": "plan_limit",
    "message": "The current plan does not allow this.",
    "fix": "Change to a plan that includes it, or reduce usage to stay within the plan, then retry.",
    "docs_url": "https://lookvalid.com/docs/errors/plan_limit",
    "retryable": false,
    "request_id": "req_3fK9pQ2xVb7LmN4sTz8WcA"
  }
}

See also