HTTP 402 Payment Required vs 426 Upgrade Required
Both HTTP 402 (Payment Required) and 426 (Upgrade Required) belong to the 4xx Client Error category. 402 indicates that reserved for future use. Originally intended for digital payment systems, some APIs use it to indicate a billing or subscription issue. Meanwhile, 426 means that the server refuses to perform the request using the current protocol but might after the client upgrades to a different protocol.
Description
Reserved for future use. Originally intended for digital payment systems, some APIs use it to indicate a billing or subscription issue.
When You See It
On some APIs when a subscription has expired or payment is needed.
How to Fix
Check your billing status, update payment method, or upgrade your subscription.
Description
The server refuses to perform the request using the current protocol but might after the client upgrades to a different protocol.
When You See It
When a server requires HTTPS or a newer protocol version.
How to Fix
Switch to the protocol specified in the Upgrade response header.
Key Differences
HTTP 402: Reserved for future use. Originally intended for digital payment systems, some APIs use it to indicate a billing or subscription issue.
HTTP 426: The server refuses to perform the request using the current protocol but might after the client upgrades to a different protocol.
You encounter 402 when on some APIs when a subscription has expired or payment is needed.
You encounter 426 when when a server requires HTTPS or a newer protocol version.
When to Use Which
For 402 (Payment Required): Check your billing status, update payment method, or upgrade your subscription. For 426 (Upgrade Required): Switch to the protocol specified in the Upgrade response header.