x402 Preflight documentation
Checkable answers for x402 API developers. Every page states what the check observes, how to reproduce it, and what it does not prove.
- How to check an x402 payment configuration before launch — A read-only check of the live HTTP 402 challenge: scheme, network, asset, amount, receiver, extensions, CORS and discovery metadata — without a wallet and without spending USDC.
- x402 resource listed in the Bazaar but buyers cannot find or pay it — The usual causes: the resource returns 404/410 while still listed, the discovery metadata drifted from the live challenge, the method differs, or the discovery consumer never indexed the update.
- x402 endpoint returns 200 without a payment challenge — If a plain GET returns the data instead of a 402, the listing cannot earn: any agent calling it gets the result for free. It is usually the payment middleware not mounted on that route, or a proxy answering first.
- Discovery requirements for x402 catalogues (OpenAPI + x-payment-info) — Catalogue crawlers prefer OpenAPI-first discovery: each paid operation declares x-payment-info with protocols and a fixed or dynamic price, plus a 402 response; /.well-known/x402 remains the compatibility path.
- What is x402? — An open, HTTP-native payment standard that lets a server charge per request: an unpaid call returns 402 with a payment challenge, the client pays in stablecoin (commonly USDC on Base), and the retried call is served — no account or key needed for that call.
- How to add x402 to an Express API — Mount the payment middleware before the protected route, configure the accepted network/asset and receiver, return a decodable 402 challenge, and verify without a wallet.
- x402 vs Stripe: per-call billing for APIs — They solve different problems: x402 is an open, crypto-settled, per-call rail for machine-to-machine payments; Stripe is a card/subscription stack for human checkout.
Back to the free endpoint check
The same notes as Markdown, for review and citation: github.com/chico10117/x402-preflight-docs