HTTP 402 Payment Required: the status code behind x402

HTTP 402 Payment Required has been reserved in the HTTP spec since the beginning but left "for future use." x402 is that future: a concrete way to use 402 to price and collect payment for a request.

Why 402 sat unused

The status code was reserved for digital payments before any standard existed for how a client should pay. With no agreed envelope or settlement rail, servers had nothing to put in a 402 response that clients could act on, so it stayed dormant for decades.

What x402 adds

x402 defines the missing contract: a 402 response carries a structured PaymentRequirements envelope (amount, asset, destination, network), and the client pays by signing a stablecoin authorization and retrying with a PAYMENT-SIGNATURE header. Now 402 is actionable by software.

See a real 402

Probe any 2s endpoint without payment to get a live 402 envelope:

cURL — probebash
# 1. Probe with no auth → HTTP 402 + the x402 PaymentRequirements envelope:
curl -i "https://2s.io/api/weather/zip?zip=94103"
# → 402 Payment Required
# → body: { "x402Version": 2, "accepts": [ { ...payTo, maxAmountRequired, network... } ], "error": "..." }

Call a live x402 API right now — no signup.

Browse the full endpoint directory, grab the quickstart, or read the llms.txt manifest. Every endpoint is keyless and pay-per-call.

FAQ

What does HTTP 402 Payment Required mean?
It is the HTTP status code indicating the request cannot be fulfilled until payment is made. It was reserved long ago but left unspecified; x402 defines how clients actually pay in response to it.
Why was 402 unused for so long?
There was no standard for what a 402 response should contain or how to pay it. Without an agreed payment envelope and settlement rail, servers could not return anything a client could act on.
How does x402 make 402 usable?
It standardizes a machine-readable payment envelope in the 402 body and a signed-authorization retry, settled in USDC on-chain — so a client can read the price and pay automatically.

Related

Topics: http 402 · 402 payment required · http status 402 · 402 status code · what is http 402