What it means
Reserved for future use since the early days of HTTP, with no standard meaning. Some services use it for billing problems: failed payments, exhausted credits or expired subscriptions.
Why you're seeing it
- A payment API rejecting a charge. Stripe, for example, returns
402when a card is declined. - A SaaS API whose account has run out of credits or is unpaid.
How to fix it
- Check the account's billing status and payment method.
- If you design an API, document what
402means for it, since clients can't rely on a standard meaning.
Example response
HTTP/1.1 402 Payment Required Content-Type: application/json {"error": "card_declined"}