BloggingBIG Logo
Search
  • Blogs
  • How we work
  • Write Guest Post
Get started

HTTP Status Code 402 Payment Required

by Kedar Dangal

  • 3 min read
    • HTTP Status
Share this content
HTTP Status Code 402 Payment Required image

Navigation

  • What is HTTP Status Code 402 Payment Required?
  • Status
  • Example response
  • Specifications
  • Usage
  • 402 Code References
  • FAQs
    • What does status code 402 error mean?
    • What do you mean by status code in HTTP?
  • Conclusion

What is HTTP Status Code 402 Payment Required?

The status code 402 (Payment Required) has been set aside for future usage.

It’s possible that the initial aim was for commercial websites and APIs to have a default mechanism to signal that an HTTP request can be repeated after a customer paid for a service.

Any private feeds on the account will become read-only for a period of 7 days if the owner of the feed downgrades a premium membership to a free one or if the subscription expires. After this time, the feed will be shut, and you won’t be able to view it unless you renew your membership or the stream is made public.

Locked feeds will not be made public, and they will not be deleted automatically.

When you upgrade to a premium membership, you’ll have access to the private feed. Another approach is to open the stream to the public and re-enable access. It’s worth noting that making the stream public makes it available to everyone.

Status

402 Payment Required

Example response

HTTP/1.1 402 Payment Required
Date: Wed, 21 Oct 2015 07:28:00 GMT

Specifications

SpecificationTitle
RFC 7231, section 6.5.2: 402 Payment Required    HTTP/1.1: Semantics and Content

Usage

It’s not a good idea to use this status code right now, according to the RFC, because it may gain a better definition in the future, perhaps rendering current sites incompatible with HTTP.

However, it hasn’t stopped individuals from employing the code in the first place.

It’s used by the Shopify API to signal that a “shop is frozen.”

It’s also used by Pubnub to signal that a feature requires payment.

It’s possible that Youtube is utilizing it to rate-limit offenders.

It is used by the Google Survey API for different sorts of limitations.

So, should you put it to use? No, according to the RFC. However, I don’t believe there is a significant risk in doing so.

402 Code References

Rails HTTP Status Symbol :payment_required

Go HTTP Status Constant http.StatusPaymentRequired

Symfony HTTP Status Constant Response::HTTP_PAYMENT_REQUIRED

Python2 HTTP Status Constant httplib.PAYMENT_REQUIRED

Python3+ HTTP Status Constant http.client.PAYMENT_REQUIRED

Python3.5+ HTTP Status Constant http.HTTPStatus.PAYMENT_REQUIRED

FAQs

What does status code 402 error mean?

The private feed is locked because the feed owner’s subscription has expired, as shown by the 402 Payment Required status code.

What do you mean by status code in HTTP?

When a server receives a request from a client, it responds with a status code. It contains codes from IETF Request for Comments (RFCs), other standards, and some extra codes that are used in some typical HTTP applications.

Related Post

HTTP Status Code 101-Switching Protocols

HTTP Status Code 205 Reset Content

HTTP Status Code 300-Multiple Choices

HTTP Status Code 302 Found

HTTP Status Code 204 – No Content

HTTP Status Code 203 – Non-authoritative Information

HTTP Status Code 207 Multi-Status

HTTP Status Code 208 Already Reported

HTTP Status Code 400 Bad Request

HTTP Status Code 401 Unauthorized

Conclusion

I hope this article was able to help you with your doubts and queries related to the HTTP status code 402 Payment Required. Still, if there are any queries related to this topic, feel free to ask in the comment section, we would be happy to assist you. Thank you.

Share
Tweet
Share
0 Shares
Kedar Dangal image

Kedar Dangal

Making a difference, Adding the sum.

Be first to comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

More from HTTP Status

HTTP Status Code 499 Client Closed Request image

HTTP Status Code 499 Client Closed Request

Kedar Dangal image

by Kedar Dangal

  • 4 min read
    • HTTP Status
HTTP Status Code 431 Request Header Fields Too Large image

HTTP Status Code 431 Request Header Fields Too Large

Kedar Dangal image

by Kedar Dangal

  • 4 min read
    • HTTP Status
HTTP Status Code 429-Too Many Request image

HTTP Status Code 429-Too Many Request

Saurabh Chalise image

by Saurabh Chalise

  • 4 min read
    • HTTP Status

Quick links

  • Siteground black friday deals
  • Wp engine black friday deals
  • Greengeeks black friday deals
  • Tmd hosting black friday deals
  • Fastcomet black friday deals
  • Hostwinds black friday deals
  • bluehost black friday
  • Namecheap black friday deals
  • Ionos 1 & 1 black friday deals
  • Hostgator black friday deals
  • ipage black friday deals
  • wpx hosting black friday deals
BloggingBIG logo
  • About
  • DISCLAIMER
  • Disclouser for Blogging BIG
  • Terms and Conditions
  • Privacy Policy
  • Sitemap
Developed by Fnclick
Back To Top