402 Payment Required

402 Payment Required is a status-code described by the standard as:

The 402 (Payment Required) status code is reserved for future use.

The original idea may have been that commercial websites and APIs would want to have a default way to communicate that a HTTP request can be repeated, after a user paid for service.

Usage

The RFC suggests that it’s not a good idea to use this status code today, because it may get a better definition in the future, possibly making existing sites incompatible with HTTP.

That being said, it hasn’t really stopped people from using the code anyway.

So should you use it? The RFC says no. But, I also don’t think there’s a major risk in doing so.

References

HTTP series

This article is part of an ongoing series about the HTTP protocol.

If you want to follow along as I write them, you can Subscribe to my Atom feed or Mailing list.

Informational 1xx

Successful 2xx

Redirection 3xx

Client Error 4xx

Web mentions