HTTP 402 Payment Required — What It Means
What HTTP status code 402 Payment Required means, when servers return it, and how to handle it correctly.
Published September 23, 2026
HTTP 402 Payment Required is reserved for future digital-payment schemes. Some APIs use it to signal that payment or a subscription is needed to access a resource.
What it means
There is no standard behaviour, so each API defines what it means.
Common causes: Subscription lapsed; Quota exceeded on a paid plan; Payment-gated content.
On the wire
GET /api/premium HTTP/1.1
HTTP/1.1 402 Payment Required
Content-Type: application/json
Practical examples
Test it from the shell
curl -i https://example.com/path # look for HTTP 402Handling 402 in code or config
res.status(402).json({ error: 'Upgrade to Pro' })How to fix it
Check the API's documentation; Update billing details; Upgrade the plan.
1. Reproduce: curl -i <url>
2. Confirm the status is 402
3. Apply the fix above and re-testCommon mistakes
- Check the API's documentation
- Update billing details
- Ignoring the response headers that explain the details.
Key takeaways
- 402 means Payment Required.
- HTTP 402 Payment Required is reserved for future digital-payment schemes.
- Read the response headers and logs for the exact cause.
FAQ
Is 402 standard?
It is reserved; usage varies by provider.
Is 402 a client or server error?
It is a client error status code, in the 4xx class.