HTTP 402 — Payment Required
HTTP 402
Payment Required
Reserved for payment; in practice used by APIs to say a plan limit or billing problem is blocking the request.
What 402 actually means
This code was set aside for some future digital cash system that never arrived, and the specification still lists it as reserved. Real services adopted it anyway: several major APIs return 402 when an account is out of credit, a subscription has lapsed, or a free-tier quota is spent. Since there is no standard behaviour, the response body is the only place the actual reason lives.
Common causes
- An API account is out of prepaid credit
- A subscription payment failed and the account was suspended
- A free-tier usage quota has been exhausted
- A trial period ended
If you're just trying to view the page
- Check the billing page of the service you are using — a failed card is the usual cause
- Look at your plan's usage limits; you may have hit a monthly cap
- Contact the service if billing looks fine, since 402 is used loosely and may not mean what it says
If it's your site
- Put the actual reason and the remediation URL in the body — 402 alone communicates nothing
- Consider 403 with a clear error code if your users are not paying you directly
- Send `Retry-After` if the block lifts on a known schedule, such as a monthly quota reset
Reference
- Status code
- 402
- Reason phrase
- Payment Required
- Category
- 4xx — Client Error
- Defined in
- RFC 9110 §15.5.3
Common questions
- What does HTTP 402 mean?
- Reserved for payment; in practice used by APIs to say a plan limit or billing problem is blocking the request. This code was set aside for some future digital cash system that never arrived, and the specification still lists it as reserved. Real services adopted it anyway: several major APIs return 402 when an account is out of credit, a subscription has lapsed, or a free-tier quota is spent.
- How do I fix a 402 error?
- Check the billing page of the service you are using — a failed card is the usual cause
- Is 402 a client error or a server error?
- 402 is in the 4xx range, which means client error. The request itself was the problem, so retrying it unchanged will usually return the same code.
Related pages
- 404 Not Found The server is reachable and working, but there is nothing at the address you ask
- 403 Forbidden The server understood the request and is refusing to allow it, and logging in wi
- 401 Unauthorized You need to authenticate, and either you did not or your credentials were reject
- 429 Too Many Requests You have sent more requests than the service allows in a given period.
- 400 Bad Request The server could not understand the request because something about it is malfor
- 413 Content Too Large The request body is bigger than the server is willing to accept.
- 422 Unprocessable Content The request is well-formed and understood, but the data in it fails the rules.
- 405 Method Not Allowed The URL exists, but it does not accept the HTTP method you used.
- 409 Conflict The request cannot be completed because it clashes with the current state of the
- 415 Unsupported Media Type The server will not accept the format of the body you sent.
- 408 Request Timeout The server gave up waiting for the client to finish sending its request.
- 410 Gone The resource was deliberately removed and is not coming back, and there is no fo