
The HTTP Status Code 402 is reserved for future use.

The 402 status code, officially known as HTTP 402 Payment Required, has become a critical part of modern API monetization. In 2026, this status code powers the emerging agentic web, where AI agents pay for API access instantly using micropayments.
Unlike traditional billing systems that rely on subscriptions or credit cards, modern APIs use the http 402 payment required response to request payment programmatically.
This shift is driven by two major forces:
Understanding both roles is essential for developers building, consuming, or monetizing APIs.
The HTTP 402 Payment Required status code means the client must complete a payment before the server will fulfill the request.
In simple terms: The resource is available — but locked behind a payment requirement.
Example: HTTP/1.1 402 Payment Required
Meaning: Access will be granted once payment is completed.
In 2026, the 402 status code will be widely used in API monetization, especially for automated systems and AI agents.
Transactional HTTP 402 Payment Required responses are used when an API requires immediate payment before granting access. This model is the foundation of the AI agent micropayments standard.
Administrative 402 is used by platforms to signal billing or quota problems.
Common causes include:
Platforms that use 402 this way include:
In this case, payment restores account functionality rather than unlocking a single request.
Developers often confuse HTTP 402 vs 403 for API monetization.
The difference is simple:

This distinction is critical when designing monetized APIs.
The L402 protocol is one of the most important modern uses of the 402 status code.
L402 allows APIs to request payment using Bitcoin Lightning Network micropayments.
This enables:
Example Node.js implementation:
app.get('/premium-data', (req, res) => {
const paymentHeader = req.headers['authorization'];
if (!paymentHeader) {
return res.status(402).set({
'WWW-Authenticate': 'L402 macaroon="...", invoice="lnbc1..."'
}).json({
error: "Payment Required",
message: "Pay 100 satoshis to access this resource."
});
}
next();
});
Flow:
This is the core of the agentic economy.
Another emerging standard is the x402 protocol, which enables payments using stablecoins and blockchain networks.
This protocol is supported by major infrastructure providers and is rapidly becoming part of the AI agent micropayments standard.
Both L402 and x402 rely on HTTP 402 to initiate payment.
The stripe 402 error is often used for billing failures or payment declines.
Common Stripe causes:
In 2026, Stripe also introduced a special case:
402 upstream_timeout This does -> NOT mean payment is required -> It means the request failed due to a connection timeout.
Safe retry example:
try {
await stripe.paymentIntents.create({...});
} catch (err) {
if (err.statusCode === 402 && err.code === 'upstream_timeout') {
retryRequest();
}
}
This pattern improves reliability.
The Shopify 402 payment required meaning typically indicates:
Fix: Pay outstanding balance.
Google uses HTTP 402 to indicate: Quota exceeded.
Meaning: Upgrade billing plan to continue. This is administrative, not transactional.
The correct 402 payment required fix depends on how the HTTP 402 Payment Required status code is being used. The table below compares the most common scenarios and how to resolve them:
Using the 402 status code, developers can build:
This makes APIs programmable revenue streams.
Building a monetized API requires accurate currency conversion.
AbstractAPI’s Exchange Rate API helps developers:
This simplifies monetization and improves reliability.
Learn more: https://www.abstractapi.com/
The HTTP 402 status code is no longer obscure.
It is now a core part of:
Protocols like:
are transforming HTTP into a programmable financial layer.
The 402 status code, officially known as HTTP 402 Payment Required, has evolved into the payment gateway of modern APIs.
In 2026, it serves two essential roles:
As APIs become economic infrastructure, HTTP 402 has become the currency of the agentic web.

Common causes include:
Fix depends on context: