Skip to the content

402 Payment Required

Reserved for payments since the early days of HTTP and never defined further. Some APIs use it for a failed charge or an empty balance.

Class
4xx Client error. The request is the problem: a wrong address, missing credentials, data the server can't accept.
Defined in
RFC 9110

Share this tool:TwitterFacebookLinkedInWhatsAppEmail

What causes it

The standard only says that the code is reserved for future use. A number of services have given it a meaning of their own: a payment that did not go through, a subscription that has run out, a quota that is used up. What it means exactly is in the documentation of the service you are talking to.

What to do about it

Read the body of the response, and then look at the account: pay the invoice, top up the balance or move to a larger plan. Sending the same request again does not help.

If you build an API, be aware that clients have no fixed expectations of a 402. A 403 with a clear message, or a 429 for a quota, is better understood.

Not to be confused with

403 ForbiddenRefused for a reason that has nothing to do with payment.
429 Too Many RequestsToo many requests in a period, the usual code for a quota.

All codes are on the list of HTTP status codes, which can be searched by number and by word.

See all 12