At One Place

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

  1. Check the billing page of the service you are using — a failed card is the usual cause
  2. Look at your plan's usage limits; you may have hit a monthly cap
  3. Contact the service if billing looks fine, since 402 is used loosely and may not mean what it says

If it's your site

  1. Put the actual reason and the remediation URL in the body — 402 alone communicates nothing
  2. Consider 403 with a clear error code if your users are not paying you directly
  3. 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

Sources

  1. Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA
  2. RFC 9110: HTTP Semantics — IETF

How these figures are compiled and checked