HTTP

HTTP 402 Payment Required vs 422 Unprocessable Content

Both HTTP 402 (Payment Required) and 422 (Unprocessable Content) 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, 422 means that the server understands the content type and syntax, but was unable to process the contained instructions. Common in API validation errors.

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 understands the content type and syntax, but was unable to process the contained instructions. Common in API validation errors.

When You See It

When form validation fails — correct syntax but invalid data (e.g., email format wrong, date in the past).

How to Fix

Check the response body for specific validation errors and correct the input data.

Key Differences

1.

HTTP 402: Reserved for future use. Originally intended for digital payment systems, some APIs use it to indicate a billing or subscription issue.

2.

HTTP 422: The server understands the content type and syntax, but was unable to process the contained instructions. Common in API validation errors.

3.

You encounter 402 when on some APIs when a subscription has expired or payment is needed.

4.

You encounter 422 when when form validation fails — correct syntax but invalid data (e.g., email format wrong, date in the past).

When to Use Which

For 402 (Payment Required): Check your billing status, update payment method, or upgrade your subscription. For 422 (Unprocessable Content): Check the response body for specific validation errors and correct the input data.

Learn More