402 Payment Required
HTTP response status code 402 Payment Required is a client error that is returned by the server to indicate that payment is required before the client can access the requested resource.
When the 402 Payment Required error message is received, the client understands that access to the requested resource may not be granted at this time.
402 Payment Required is a server response that is reserved for future use. Currently, its use is non-standard and may be changed in the future if the specification is more fully defined.
Because this is a non-standard response, different providers have used it in different ways. For example, the Shopify API returns 402 Payment Required status to indicate the online shop is currently frozen and that the store administrator has to pay an outstanding account balance to bring it back online.
Search engines like Google will not index a URL with 402 Payment Required response status, and consequently, URLs that have been indexed in the past but are now returning this HTTP status code will be removed from the search results.
In the example, the client requests a resource and the server responds with the 402 Payment Required status to indicate that the user cannot access the resource at this time.
GET /tech-news HTTP/1.1 Host: www.example.ai
HTTP/1.1 402 Payment required
Apache HttpComponents Core
The 402 Payment Required status code is reserved for future use and thus its current use is non-standard. However, it is intended to support a digital cash or micro-payment scheme for content.