4024xx Client ErrorMedium

HTTP 402 Payment Required

Defined in RFC 7231

What Does HTTP 402 Mean?

Reserved for future use. Originally intended for digital payment systems, now sometimes used by APIs to indicate a subscription or payment is needed.

Common Causes

  1. 1Subscription expired or payment overdue
  2. 2API usage quota exceeded on paid plan
  3. 3Paywall blocking content access
  4. 4Free tier limit reached

Impact

  • Cannot access premium content or features
  • Must upgrade subscription or make payment
  • API requests blocked until payment is made

Developer Fix

For web developers and application engineers

  1. 1Implement proper payment flow handling
  2. 2Show clear upgrade prompts on 402 responses
  3. 3Handle billing state checks before making requests

Server Admin Fix

For system administrators and DevOps engineers

  1. 1Verify billing integration is working correctly
  2. 2Monitor for false positive payment blocks
  3. 3Ensure payment status is synced across services

Frequently Asked Questions

Is 402 an official HTTP status code?
It is reserved in the HTTP specification but was never formally defined with a standard meaning. Various services use it informally to indicate that payment is required.
Should I use 402 in my API?
It has become a common convention for indicating payment is needed. If your API has paid tiers, 402 is a reasonable choice, though some prefer 403 with a descriptive message.

Related HTTP Status Codes

About the Author

Web Infrastructure Team

Verified against official RFC specifications and real-world server configurations. HTTP status code behavior confirmed across Apache, Nginx, and Cloudflare.