Difference between http response status code 402 and 403

rest_day picture rest_day · Aug 13, 2009 · Viewed 15.9k times · Source

Friends and fellow users,

We have both 402 and 403 http response codes. Though, 402 is reserved for future use.

What is (or would be) the difference between these two. Payment not received should be equal to not authorized, shouldn't it?

EDIT:I would like to know the answers on a "Why 402 is required when we already have 403" angle.

Answer

kmindi picture kmindi · Sep 25, 2012

The HTTP Statuscode 402 is indeed different from 403:

As it states in RFC 2616 the status code 402 is

402 Payment Required

That means the request is not generally forbidden but requires payment. Apparently it is used by some services in the intended manner List of HTTP status codes

I think it is currently not needed (or just not used because not specified how to use) but the authors of the standard did some thought an put it in for future use which could be useful.