402 HTTP Origin: Network OSI layer 7 · Application Last updated 12 Oct 2026

HTTP 402 Payment Required

The service wants payment before it will process the request — an unpaid invoice, exhausted credits or a failed card.

Exact message you may see 402 Payment RequiredPayment Required
Seen on: REST API

Meaning

402 was reserved for future use in the HTTP spec, but many APIs use it: Stripe returns 402 for declined cards (card_error), Vercel/Netlify/Shopify when a plan limit or invoice is unpaid, and AI/SaaS APIs when credits run out.

Common causes

  • Card declined (Stripe card_error)
  • Account billing overdue or trial expired
  • Prepaid credits/quota exhausted
  • Feature requires a paid plan

⚡ Quick fix

  1. Check the billing page or invoice for the account the API key belongs to
  2. Top up credits or update the payment method
  3. For Stripe, read error.decline_code and ask the customer for another card

Detailed fix by platform

Node.js

  1. javascript
    try { await stripe.paymentIntents.confirm(id); }
    catch (e) { if (e.statusCode === 402) console.log(e.code, e.decline_code); }

How to diagnose

  1. Account — Which account/key is being charged?
  2. Body — Error type/decline_code
  3. Billing — Overdue invoices or zero credit?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

403 — HTTP 403 Forbidden (HTTP)403429 — HTTP 429 Too Many Requests (HTTP)429507 — HTTP 507 Insufficient Storage (HTTP)507Disk quota exceeded — Disk quota exceeded (EDQUOT) (Linux)Disk quota exceededexceeded quota — Error creating: pods is forbidden: exceeded quota: compute-resources, requested: limits.memory=1Gi, used: ..., limited: ... (Kubernetes)exceeded quotafeature_not_enabled — API Error: Feature not enabled for this account (feature_not_enabled / not available on your plan) (API)feature_not_enabledinsufficient_quota — LLM API: You exceeded your current quota, please check your plan and billing details (insufficient_quota / credit balance is too low) (API)insufficient_quotaSkuNotAvailable — Azure: SkuNotAvailable / QuotaExceeded when creating a VM or resource (Azure)SkuNotAvailable402

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.