Understand x402

Schemes and networks

Check which schemes, chains and tokens a facilitator actually serves before you build against it.

The protocol is open about what can be paid and where. The served set is narrow, and the gap between "the spec allows it" and "a facilitator serves it" causes a confusing class of failure.

The exact scheme#

One scheme is in production use: exact. It means an EIP-3009 TransferWithAuthorization for a precise amount, signed over the token contract's EIP-712 domain.

Why EIP-3009 rather than approve + transferFrom:

  • Gasless for the payer. The signature is data; someone else broadcasts it. An agent needs the payment asset only, not the chain's gas token.
  • Exact and bounded. The amount, the recipient, and a validity window are all inside the signed payload. A facilitator cannot pay a different address or a different amount.
  • Single-use by construction. The nonce is enforced by the token contract, so a captured authorization cannot be replayed.
  • Auditable. The token emits AuthorizationUsed, which lets an indexer distinguish an x402 payment from an ordinary transfer.

The token must implement EIP-3009. USDC does; most ERC-20s do not. That constraint, not policy, is why the ecosystem is USDC-shaped today.

Networks#

NetworkCAIP-2Also written asStatus
Base mainneteip155:8453baseLive. Where real value moves
Base Sepoliaeip155:84532base-sepoliaTestnet. Free to get wrong

Important

Publishers label the same chain inconsistently — base and eip155:8453 both appear in live catalog entries. A client should accept both spellings and normalise to the CAIP-2 form. Roundhouse does exactly this on ingest, which is why a service listed as base is still queryable as eip155:8453.

Assets#

USDC, at 6 decimals, on both networks.

NetworkUSDC contract
Base0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Base Sepolia0x036CbD53842c5426634e7929541eC2318f3dCF7e

Read the address from the 402 challenge's asset field or from a facilitator descriptor rather than hard-coding it. The index stores per-chain token metadata rather than assuming one token per chain, so a second asset is a configuration change and not a schema change — expect the set to grow.

An amount is always atomic units in a string. "10000" is one cent. There is no decimal form anywhere on the wire.

Facilitator coverage is not universal#

This is the trap worth internalising, because the error message actively misleads.

x402.org/facilitator is EVM testnet only. It serves base-sepolia / eip155:84532 and has no Base mainnet support. Asked to settle on a chain it does not serve, it returns a 500 that reads like a payment failure — but the payment was fine and the configuration was not.

Always ask first:

bash
curl -sL "https://x402.roundhouse.studio/supported" | jq
json
{
  "kinds": [
    { "x402Version": 1, "scheme": "exact", "network": "base" },
    { "x402Version": 2, "scheme": "exact", "network": "eip155:8453" }
  ]
}

The Roundhouse facilitator serves Base mainnet, exact, USDC — both the v1 short name and the v2 CAIP-2 form, so a client of either vintage works unmodified. For testnet work, point at x402.org/facilitator instead. Details in facilitators.

Choosing a network#

You areUse
Building and testing a clientBase Sepolia, with x402.org/facilitator
Charging real moneyBase, with a mainnet facilitator
Wanting the payment indexed and publicBase — the index tracks mainnet settlements

A testnet settlement is not indexed as economic activity, which is the point: your integration tests should not accumulate a reputation.

Next steps#