HTTP 402 — Payment Required
Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme
When to use it
Use status 402 when this is the correct HTTP response semantic: Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme
Request and response example
GET /protected-resource HTTP/1.1
Host: api.example.com
HTTP/1.1 402 Payment Required
Content-Type: application/json
{"error":"Request cannot be completed"}