Error Codes Wiki

HTTP 402 Payment Required — Reserved for Future Use

Warning4xx client error

About HTTP 402 Payment Required

HTTP 402 Payment Required is officially reserved for future use but is used by some APIs to indicate that payment is needed to access a resource. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.

Here are the key things to understand: Originally reserved for digital payment systems that never materialized in HTTP/1.1. No standard behavior defined — implementations vary by API. Some APIs use it for expired subscriptions or exceeded free tier limits. Stripe, Google APIs, and others use 402 for payment-related access blocks. The W3C Web Payments API may eventually give this code official behavior. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.

The most common reasons this occurs include: API subscription expired or free tier quota exceeded. Payment method on file declined or expired. Resource behind a paywall requiring purchase. SaaS product feature locked behind a higher pricing tier. Trial period expired. Identifying the root cause is the first step toward finding the right solution.

To resolve this, follow these recommended steps: Check your subscription status with the service provider. Update payment method if the card on file has expired. Review API usage against quota limits in the provider dashboard. Contact the API provider's billing support for account-specific issues. Check the response body — most APIs include details about what payment action is needed. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.

This article is part of our HTTP Status Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.

Quick Answer

Is 402 an official HTTP status code?

It is registered in the HTTP spec but marked as 'reserved for future use.' There is no official standard for how it should behave.

Overview

HTTP 402 Payment Required is officially reserved for future use but is used by some APIs to indicate that payment is needed to access a resource.

Key Details

  • Originally reserved for digital payment systems that never materialized in HTTP/1.1
  • No standard behavior defined — implementations vary by API
  • Some APIs use it for expired subscriptions or exceeded free tier limits
  • Stripe, Google APIs, and others use 402 for payment-related access blocks
  • The W3C Web Payments API may eventually give this code official behavior

Common Causes

  • API subscription expired or free tier quota exceeded
  • Payment method on file declined or expired
  • Resource behind a paywall requiring purchase
  • SaaS product feature locked behind a higher pricing tier
  • Trial period expired

Steps

  1. 1Check your subscription status with the service provider
  2. 2Update payment method if the card on file has expired
  3. 3Review API usage against quota limits in the provider dashboard
  4. 4Contact the API provider's billing support for account-specific issues
  5. 5Check the response body — most APIs include details about what payment action is needed

Tags

http402paymentsubscriptionapi

More in 4xx Client Error

Frequently Asked Questions

It is registered in the HTTP spec but marked as 'reserved for future use.' There is no official standard for how it should behave.