| Previous | Next |
| HTTP_STATUS_DENIED | HTTP_STATUS_FORBIDDEN |
HTTP_STATUS_PAYMENT_REQ
HTTP_STATUS_PAYMENT_REQ represents HTTP 402 Payment Required. Despite the descriptive reason phrase, RFC 9110 reserves status 402 for future use and does not define a payment protocol, required header fields, retry procedure, or interoperable representation format for this response.
Application-specific uses are private contracts
APIs and services can still choose to return the numeric code 402 for billing, account balance, quota, or payment failures. Those meanings belong to the service's own API contract. A generic HTTP client cannot safely infer whether the user must add funds, retry a card, upgrade a plan, reduce usage, or perform some other action merely from the status code.
When diagnosing 402, preserve the response body and service-specific headers and consult the API documentation for the endpoint that emitted it. Check whether an intermediary passed the response unchanged or synthesized it locally. Do not implement a universal automatic payment retry based only on 402: the HTTP specification intentionally leaves the status reserved and provides no standardized recovery flow.
References
- RFC 9110, 402 Payment Required — the status is reserved for future use.
- IANA HTTP Status Code Registry — current registration and reference for status 402.
Looking for a different code? Search another status or error code.