Explainer
How does HTTP 402 work?
A reserved status code. The interesting part is the payload, the retry, and who verifies payment.
HTTP 402 Payment Required has been reserved in HTTP for decades (see RFC 9110). Until recently most servers never used it.
In x402’s HTTP transport, the server sends 402 with a PAYMENT-REQUIRED header. The client pays and retries with PAYMENT-SIGNATURE. The server answers with PAYMENT-RESPONSE after settlement. The HTML or JSON body is application data, not the protocol.
Cloudflare pay-per-crawl and Stripe/Tempo MPP also put meaning on 402, with different payloads. “Uses 402” is not the same as “speaks x402.”