HTTP 402 Payment Required

Reserved for future use; sometimes used to indicate payment is needed.

4xx Client Error

402

Payment Required

Description

The 402 Payment Required status code is 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, but that has not yet happened and this code is not widely used. While it is officially reserved, some services and APIs do use it to indicate that a payment is required to access the resource, such as when a subscription has expired, when a free tier limit has been reached, or when a premium feature requires payment. Nonstandard use of this status code means its behavior is not universally consistent across implementations.

When Is It Used?

Used by some APIs and SaaS platforms to indicate that a paid subscription or payment is required. For example, when a free trial has ended, when an account has exceeded its usage quota, or when trying to access a premium feature.

Example Response

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

{"error": "payment_required", "message": "Your free trial has expired. Please upgrade your plan."}

Look Up Any Status Code

Browse all status codes