402 Payment Required
4xx client error
Reserved for future billing schemes but now used by some APIs to signal that the account needs credits, a plan, or a payment before access.
Common causes
- The account ran out of prepaid credits or quota.
- The subscription lapsed or was never started.
- A paid endpoint is called on the free tier.
How to fix it
- Return a body naming the billing state and the upgrade path.
- Expose remaining balance in a header so clients can self-serve.
- Do not use 402 for ordinary auth failures, which belong to 401.
What it means for redirects and SEO
A paywall signal that stops crawlers at the gate, so the page will not be indexed unless the gate is bypassed for bots. Search engines treat it as a soft block. Keep the canonical visible to bots even when payment is enforced.