What HTTP 402 means
Reserved since HTTP/1.1 for future digital payments and never standardised. Some APIs use it when a subscription has lapsed or a quota needs a paid plan, for example Stripe for failed card payments and Shopify for frozen stores.
Retrying
No. Fix the request first; sending it again unchanged will get the same response.
Example response
HTTP/1.1 402 Payment Required
Date: Wed, 21 Oct 2026 10:30:00 GMT
Content-Type: application/json
How to return 402
res.status(402).json({ error: 'Payment Required' });
from fastapi import HTTPException
raise HTTPException(status_code=402, detail="Payment Required")
http.Error(w, http.StatusText(http.StatusPaymentRequired), http.StatusPaymentRequired)
location /private/ {
return 402;
}
Related status codes
- 403 Forbidden : The server understood the request but refuses to authorize it.
- 429 Too Many Requests : The client has sent too many requests in a given time (rate limiting).
Other 4xx status codes
400 Bad Request · 401 Unauthorized · 403 Forbidden · 404 Not Found · 405 Method Not Allowed · 406 Not Acceptable · 407 Proxy Authentication Required · 408 Request Timeout · 409 Conflict · 410 Gone · 411 Length Required · 412 Precondition Failed · 413 Content Too Large · 414 URI Too Long · 415 Unsupported Media Type · 416 Range Not Satisfiable · 417 Expectation Failed · 418 I’m a Teapot · 421 Misdirected Request · 422 Unprocessable Content · 423 Locked · 424 Failed Dependency · 425 Too Early · 426 Upgrade Required · 428 Precondition Required · 429 Too Many Requests · 431 Request Header Fields Too Large · 444 No Response · 451 Unavailable For Legal Reasons · 499 Client Closed Request
See the full list of HTTP status codes.
Sources
Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.
Frequently asked questions
What does HTTP 402 Payment Required mean?
HTTP 402 Payment Required is reserved for payment-related errors and has no standard meaning. Reserved since HTTP/1.1 for future digital payments and never standardised. Some APIs use it when a subscription has lapsed or a quota needs a paid plan, for example Stripe for failed card payments and Shopify for frozen stores.