Subscribe to PHP Freaks RSS

402 Payment Required

syndicated from planet-php.net on November 27, 2018

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