HTTP Status Codes / 4xx HTTP Status Codes / HTTP 402

402 Payment Required

This is an educational reference page about HTTP 402 Payment Required. The page itself is served as 200 OK so it can be indexed as HTTP documentation.

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, as proposed, for example, by GNU Taler, but that has not yet happened, and this code is not widely used. Google Developers API uses this status if a particular developer has exceeded the daily limit on requests. Sipgate uses this code if an account does not have sufficient funds to start a call. Shopify uses this code when the store has not paid their fees and is temporarily disabled. Stripe uses this code for failed payments where parameters were correct, for example blocked fraudulent payments.

What it means

HTTP 402 Payment Required says the server is refusing the request for a billing or payment-related reason.

Common causes

How to fix it

Example response

HTTP/1.1 402 Payment Required
Content-Type: application/json

{"error":"payment_required","next":"update_billing"}

Developer notes

402 was originally reserved and is still not used consistently by browsers. It is most useful in documented APIs where clients know how to recover from billing states.

Questions

What does HTTP 402 mean?

HTTP 402 means the server will not complete the request until a billing or payment issue is resolved.

Is HTTP 402 standard?

HTTP 402 is reserved by the HTTP specification, but real services use it inconsistently. Document it clearly if your API returns it.

Should I use 402 or 403?

Use 402 when payment is the blocker. Use 403 when the user is authenticated but not authorized.

4xx client error – the request contains bad syntax or cannot be fulfilled


HTTP status code lookup
By Ping Now, a website/API/service uptime monitor
Data from Wikipedia