402 Payment Required

HTTP 402 Payment Required is a 4xx client error status. Reserved for future use, but some APIs use it when a plan limit or payment is needed.

402Status code
4xxClient error
NoCacheable by default
RFC 9110 §15.5.3Defined in

Common causes

What to do

Check the account's billing status with the API provider.

Example response

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

{"status":402,"title":"Payment Required"}

Returning 402 in code

Express   res.status(402).json({ … });
Flask     return jsonify(…), 402
PHP       http_response_code(402);
Go        w.WriteHeader(402)
nginx     return 402;

Other 4xx codes

Frequently asked questions

What does HTTP 402 mean?
Reserved for future use, but some APIs use it when a plan limit or payment is needed.
Is 402 an error?
Yes. It is a client error: the request needs to change before retrying.
Does a 402 hurt SEO?
If search engines see it repeatedly on pages that should rank, those pages can be dropped from the index. Fix it quickly.