@http · HTTP status codes, explained HTTP/1.1 402 Payment Required ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4xx · Client error Reserved; sometimes used for paywalls and quotas. 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 402 when 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 402 means 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"} related 403 Forbidden   401 Unauthorized   429 Too Many Requests spec RFC 9110 §15.5.3 https://www.rfc-editor.org/rfc/rfc9110#section-15.5.3 web https://athttp.com/402 ← curl athttp.com/401 curl athttp.com/403 →