As digital commerce evolves, the mechanisms for discovering and executing crypto payments are undergoing rapid transformation. Two approaches are at the forefront of this shift: X402, Coinbase’s open-source protocol leveraging the HTTP 402 “Payment Required” status code, and the standardized /. well-known/payto endpoint. For developers, businesses, and AI agent ecosystems, understanding the differences between these methods is critical to architecting seamless, secure, and future-proof payment flows.

X402: In-Band Crypto Payments Over HTTP
The X402 protocol introduces a fundamentally new way for clients and servers to negotiate payments directly within the HTTP request-response cycle. When a client requests a paid resource, the server responds with a 402 status code, signaling that payment is required. The client can then initiate an on-chain transaction using stablecoins like USDC. Once payment is confirmed on-chain, access to the resource is granted automatically, all within milliseconds.
This in-band approach tightly integrates payment negotiation and settlement with application logic, enabling use cases such as:
- AI agents paying per API call or per second of compute time
- Automated microtransactions for data streams or premium content
- Real-time monetization of digital services without intermediaries
The result is an architecture that supports frictionless automation and native web integration, without relying on legacy payment rails or manual intervention.
/. well-known/payto: Out-of-Band Payment Discovery Explained
The /. well-known/payto method offers a different paradigm. Here, servers expose a standardized file at the/. well-known/payto endpoint containing details like supported cryptocurrencies and wallet addresses. Clients retrieve this file to discover how payments should be made but must handle transaction initiation separately from the main HTTP communication.
This out-of-band discovery process can be effective for static resources or when integrating with wallets that do not support dynamic negotiation. However, it introduces extra steps, clients must parse external files and coordinate off-channel transactions, which can hamper automation and increase integration complexity for real-time applications.
Key Differences: x402 vs /.well-known/payto
-

Integration with HTTP Protocol: x402 is an in-band protocol that embeds payment requests and processing directly within the standard HTTP communication flow using the HTTP 402 “Payment Required” status code. In contrast, /.well-known/payto operates out-of-band, requiring a separate file retrieval outside the main HTTP request/response cycle.
-

Payment Automation and Real-Time Processing: x402 enables instant, automated stablecoin payments (e.g., USDC) during API or resource requests, allowing AI agents and applications to complete transactions in real time. /.well-known/payto involves manual or additional automated steps, as clients must fetch payment details and initiate payments separately.
-

Payment Discovery Mechanism: x402 signals payment requirements directly within the HTTP response, streamlining the discovery and initiation of payments. /.well-known/payto relies on clients knowing to look for and retrieve a /.well-known/payto file to discover payment information, which adds an extra discovery step.
-

Supported Payment Assets: x402 is designed for on-chain, stablecoin-based payments (such as USDC), with a focus on web-native, programmable money. /.well-known/payto can support a broader range of assets and payment methods, as specified by the server in the file, but does not provide real-time payment integration.
-

Use Cases and Ecosystem: x402 is purpose-built for AI agent, API, and machine-to-machine commerce, enabling per-request, per-service, or per-second micropayments. /.well-known/payto is more general-purpose, suitable for static payment address discovery for websites, individuals, or organizations.
Why In-Band vs Out-of-Band Matters for Developers and AI Agents
The distinction between in-band (X402) and out-of-band (/. well-known/payto) protocols is more than technical nuance, it shapes user experience, security posture, and automation potential. In an era where AI agents transact autonomously in milliseconds and API monetization models proliferate, minimizing latency and manual steps becomes paramount.
X402’s in-band design allows agents to discover pricing, negotiate terms, make payments, and gain access all within a single automated workflow, enabling scenarios impossible with traditional out-of-band discovery alone. By contrast, /. well-known/payto remains valuable for backward compatibility or simple static integrations but may struggle to keep pace with agentic commerce’s demands.
