What 402 means
Officially “reserved for future use”: the spec has never defined how it should work. In practice, some APIs and platforms send it when a payment, credit or paid plan is needed.
When servers send it
Card payment APIs for a failed charge, SaaS APIs when a trial or quota has run out, hosting platforms when an account is unpaid.
Common causes
- A declined card or failed payment.
- Free credits or a plan’s limit used up.
- An unpaid invoice that suspended the account.
How to fix it as a developer
- Read the response body: each service uses 402 differently and explains its meaning there.
- Check your billing dashboard, plan limits and card details for the service.
- Because there’s no standard behaviour, don’t build generic client logic around 402.
How to fix it as a visitor
- Check your subscription or payment details on that site, or contact the site’s support.
Related codes
- 403 Forbidden: The server understood who you are and won’t let you do this.
- 429 Too Many Requests: You’ve sent too many requests in a given time. Slow down and try again later.
- 401 Unauthorized: You need to log in, or the credentials you sent are missing, wrong or expired.
Where it’s defined
402 Payment Required is defined in RFC 9110, section 15.5.3. It’s a 4xx code, the client error class: something is wrong with the request, so sending it again unchanged won’t help.
Other 4xx codes
400 Bad Request · 401 Unauthorized · 403 Forbidden · 404 Not Found · 405 Method Not Allowed · 406 Not Acceptable · 408 Request Timeout · 409 Conflict · 410 Gone · 413 Content Too Large · 414 URI Too Long · 415 Unsupported Media Type · 418 I’m a teapot · 422 Unprocessable Content · 429 Too Many Requests · 431 Request Header Fields Too Large · 451 Unavailable For Legal Reasons · 499 Client Closed Request
Or search them all in the HTTP status code list.