Blockchains are fast and and cheap now! Modern blockchains like Base, Solana, Sui (and many more) typically have block times <2 seconds, and a stablecoin transfer can cost as little as $0.0005 independent of the $ amount being transfered
its not that 402 isn't used, its that there is no standard response, which makes it hard for AI agents to pay for access.
x402 provides a standard response format clients can programmatically use to create a payment, either using crypto assets like stablecoins, or in future, fiat methods.
>Given that this runs atop Payment Required, doesn’t this mean that each API request would involve an extra one or two data transfers?
Yes, assuming its the first time you've interacted with an API endpoint and don't have cached payment requirements.
>Is there a reason why you wouldn’t pay ahead of time? I just understand why you couldn’t buy a few dozen/hundred/thousand dollars worth of credits, and wait until it runs low.
This would require manually integrating each vendor, which is totally valid if your agent performs a lot of a single type of task, but we suspect over time there will be huge value in agents being able to dynamically select tools / apis they want to use to accomplish their tasks, and dynamically pay for what they use
This depends on the implementation on the underlying network, but basically the spending signs an authorization for transfer, and the merchant either settles that onchain themselves or delegates to what is called a facilitator that settles on their behalf. On EVM chains for the exact payment scheme this leverages EIP-3009 signatures
x402 as a protocol has no fees, but the underlying network transactions are conducted on my have costs. Merchants can choose the underlying network transactions are conducted on that best fit their usecase. x402 also has the concept of a facilitator, which exists to abstract away the underlying payment networks. Many facilitators (including Coinbase's) subsidize the gas used for transactions.
(x402 author here) Thats actually exactly what the intention with x402 is. Merchants express to the buyer multiple ways that they accept payment and the buyer chooses the one they prefer.
As of right now stablecoins on various crypto rails are the major form (largely because they're the easiest to start with from a development standpoint), but as Cloudflare indicated in their blogpost, they're proposing a scheme that uses deferred payment via credit card or ACH https://blog.cloudflare.com/x402/.