# x402docs.com Full Content Summary ## Site Purpose x402docs.com is a practical field guide for builders adopting x402. It explains the protocol flow, v2 headers, server and client integration, facilitators, networks, schemes, security, migration, and agent/MCP use cases. The site is not an official x402 Foundation site; it is a sourced synthesis with direct links to primary docs. ## Pages ### / Homepage. Summarizes x402 as an HTTP 402 payment protocol and introduces the five-step model: request, 402 challenge, signed retry, verify, serve. Includes stat callouts for v2 headers, CAIP-2 identifiers, and the lack of universal browser-native 402 payment UX. ### /what-is-x402 Defines x402 as a payment handshake for ordinary HTTP resources. Explains client, resource server, facilitator, and network/scheme roles. Clarifies that x402 is not a wallet, blockchain, processor, or paywall UI by itself. ### /http-402-flow Documents the x402 v2 flow. Covers PAYMENT-REQUIRED, PAYMENT-SIGNATURE, and PAYMENT-RESPONSE. Explains Base64-encoded JSON header objects, signed retries, facilitator verification, settlement, and generic HTTP 402 caveats. ### /server-integration Guides sellers through route selection, route descriptions, middleware shape, facilitator configuration, and production tests. Warns against wrapping an entire API before validating one clear paid resource. ### /client-agent-guide Explains buyer-side policy before signing. Covers max price, allowed hosts, allowed networks, signer setup, wallet governance, idempotency, and retry safety for agents and programmatic clients. ### /facilitators Explains facilitator verify and settle responsibilities, why services use facilitators, and how to evaluate version support, network support, uptime, duplicate handling, receipt fields, and operational trust. ### /networks-and-assets Explains x402 v2 CAIP-2 identifiers, default assets for dollar-string pricing, custom ERC-20 metadata needs, Base and Base Sepolia examples, Solana identifiers, and network-selection tradeoffs. ### /payment-schemes Compares exact, upto, and batch-settlement. exact fits fixed-price resources. upto fits variable usage with a maximum authorization. batch-settlement fits repeated high-throughput paid calls with later redemption. ### /security-and-reliability Provides a checklist for resource servers, clients, and business operations. Covers wrong amount, wrong destination, replay, duplicate settlement, wallet spend caps, idempotency, refunds, receipts, and observability. ### /v1-to-v2-migration Maps legacy x402 examples to v2: X-PAYMENT becomes PAYMENT-SIGNATURE, X-PAYMENT-RESPONSE becomes PAYMENT-RESPONSE, v2 adds PAYMENT-REQUIRED, network aliases become CAIP-2 identifiers, and package names move to @x402 modules. ### /mcp-and-agent-commerce Explains why x402 fits tool-using agents and MCP servers. Recommends keeping signer access and payment policy in trusted runtime code rather than exposing raw payment logic to model prompts. ### /x402-vs-subscriptions Compares x402 pay-per-request payments with subscriptions, API keys, prepaid credits, and card-based billing. Explains when x402 fits discrete HTTP resources, when subscriptions still fit account-heavy products, and how to model unit economics, batch settlement, refunds, and buyer policy. ### /x402-header-format Explains the x402 v2 header format: PAYMENT-REQUIRED, PAYMENT-SIGNATURE, and PAYMENT-RESPONSE. Covers Base64 JSON values, a typical PaymentRequired shape, v1 X-PAYMENT migration, CAIP-2 network identifiers, and safe debugging limits. ### /source-map Lists primary sources and the site's verification policy. Directs protocol claims to x402 Foundation docs/specs, HTTP claims to RFC 9110 or MDN, and provider claims to provider docs. ## Free Tools ### /tools/ Index of free, client-side x402 tools. Links the response builder, pricing calculator, and payment-header decoder. All tools run in the browser and do not send entered payment data to a backend. ### /tools/402-builder Client-side 402 response builder. Inputs: resource URL, description, price, MIME type, scheme, CAIP-2 network, asset, and payTo recipient. Outputs: x402 v2 PaymentRequired JSON, Base64 PAYMENT-REQUIRED header, HTTP 402 response example, and retry curl shape. Uses current v2 header names and default USDC asset examples for Base, Base Sepolia, Polygon, Arbitrum, Solana mainnet, and Solana devnet. ### /tools/pricing-calculator Client-side x402 pricing calculator. Inputs: monthly API calls, price per call, x402 percentage fee, fixed per-call overhead, subscription price, included calls, and card or processor fee assumptions. Outputs: gross revenue, estimated fees, net revenue, buyer overpay, subscription units, and break-even call volume. Assumptions are dated 2026-07-06 and editable. ### /tools/header-decoder Client-side x402 header decoder. Accepts Base64 PAYMENT-REQUIRED, PAYMENT-SIGNATURE, PAYMENT-RESPONSE, or legacy X-PAYMENT-like values. Outputs decoded JSON, likely x402 version, likely header type, and field-by-field explanations. It decodes and explains fields only; it does not verify signatures, balances, facilitator responses, or settlement. ## High-Trust Sources - RFC 9110: https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.3 - MDN 402: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/402 - x402 docs: https://docs.x402.org/ - x402 GitHub: https://github.com/x402-foundation/x402 - Coinbase migration guide: https://docs.cdp.coinbase.com/x402/migration-guide - Coinbase launch: https://www.coinbase.com/developer-platform/discover/launches/x402 - Cloudflare x402 post: https://blog.cloudflare.com/x402/ - Stripe x402 quickstart: https://docs.stripe.com/payments/machine/x402/quickstart?locale=en-GB - Solana x402 overview: https://solana.com/x402/what-is-x402 ## Independence x402docs.com is an independent source-grounded publication. It is not affiliated with the x402 Foundation, Coinbase, Cloudflare, Stripe, Solana, Anthropic, or linked providers.