Tutorials, comparisons and design patterns for building autonomous agents that self-fund, call 345+ models and orchestrate MCP Tools.
The x402 series so far covered the side that gets paid — schemes, facilitators, discovery. This post walks the side that pays: the x402Client builder, CAIP-2 scheme registration across nine-plus networks, lifecycle hooks that can abort or recover a payment, network preference selectors, and the three custody options for the signing key. The wrapper is one line; the policy around it is where agent spend control actually lives.
Every x402 scheme — exact, upto, batch-settlement — terminates in the same three-endpoint API: the facilitator. We walk the v2 spec's /verify, /settle and /supported contracts field by field, map the error taxonomy, dissect what a facilitator can and cannot do to you, and survey the July 2026 facilitator market from CDP's hosted service to the self-hostable x402-rs.
x402's third scheme decouples access from settlement: the client signs a commitment per request, the network accumulates it, and value moves later in batch. We walk the generic spec (commit, accumulate, redeem), the two trust models, and Cloudflare's cloudflare:402 binding built on RFC 9421 signatures — the rail under pay-per-crawl.
The exact scheme charges a fixed price, but an LLM call's cost is unknown until the last token is generated. The upto scheme closes that gap: the agent signs a capped authorization via Permit2's witness pattern, the server settles the actual amount — down to zero. We walk the spec, the proxy contract, and Apify's 20,000-Actor production deployment.
On EVM chains, x402 rides on EIP-3009 signatures. Solana has no transferWithAuthorization, so the exact SVM scheme takes a different route: the agent signs a real transaction minus one signature, and the facilitator co-signs as fee payer. We walk through the spec — instruction layout, fee-payer safety rules, memo nonces, and the replay window.
IP allowlists and User-Agent strings cannot authenticate autonomous agents. Web Bot Auth puts an Ed25519 signature on every request, publishes keys in a well-known directory, and now has an IETF working group behind it. We walk the wire format, the deployments at Cloudflare and AWS, and the point where verified identity meets x402 payment.
The Agentic Commerce Protocol from OpenAI and Stripe defines how ChatGPT buys goods on your behalf. We read the spec: the five checkout_sessions endpoints, the signed delegate_payment call that mints a scoped vault token, and Stripe's Shared Payment Token. Then we contrast its card-custodial model with x402's non-custodial stablecoin rail.
Payments week for autonomous agents: the Linux Foundation took over x402 with Visa, Mastercard, Stripe and Circle onboard; a Visa-Artemis report drew the line between card macro-commerce and stablecoin micro-commerce; Binance wired x402 into its agentic wallet; and Zscaler documented agents making crypto payments to attackers via prompt injection.