Skip to content

4xx Client error

402 Payment Required

Payment is needed before the request can succeed.

What 402 means

Reserved in the spec, but used by many APIs when you've run out of credits, hit a paid-plan limit or have a failed payment.

Common causes

  • Your plan's quota or credits are used up.
  • The feature needs a paid plan.
  • A card payment failed.

How to fix it

If you're calling an API

  • Check your account's billing page and usage dashboard.

If you run the server

  • Explain in the body what's needed (upgrade, top-up) and link to billing.

Should you retry?

Only after resolving billing.

Example response

HTTP
HTTP/1.1 402 Payment Required
Content-Type: application/problem+json

{
  "type": "about:blank",
  "title": "Payment Required",
  "status": 402,
  "detail": "Payment is needed before the request can succeed."
}

Defined in: RFC 9110 (reserved). 402 is a client error: change the request before retrying.

Debugging an API call? Convert your request with the cURL converter, check the response with the JSON formatter, or see whether the API is down on its status page.

HTTP 402 FAQ

What does HTTP 402 mean?

402 Payment Required: Payment is needed before the request can succeed. Reserved in the spec, but used by many APIs when you've run out of credits, hit a paid-plan limit or have a failed payment.

Is 402 a client or server error?

It's a client error (4xx): something about the request needs to change before it can succeed.

How do I fix a 402 error?

Check your account's billing page and usage dashboard.

Should I retry after a 402?

Only after resolving billing.

Other 4xx status codes

All HTTP status codes