Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.x402.org/llms.txt

Use this file to discover all available pages before exploring further.

Network Identifiers (CAIP-2)

x402 uses CAIP-2 standard network identifiers (namespace:reference) for unambiguous cross-chain support:
  • EVM networks: eip155:<chainId> — any EVM chain is supported (e.g., eip155:8453 for Base)
  • Solana: solana:<genesisHash> (first 32 bytes of the genesis block hash)
  • TON (TVM): tvm:<workchain> (e.g., tvm:-239 for mainnet, tvm:-3 for testnet)
  • Algorand: algorand:<genesisHash> (base64-encoded genesis hash)
  • Stellar: stellar:<network> (pubnet or testnet)
  • Aptos: aptos:<chainId> (e.g., aptos:1 for mainnet)
  • Hedera: hedera:<network> (mainnet or testnet)

Token Support

x402 supports tokens on EVM, Solana, TON, Stellar, Aptos, and Hedera networks:
EcosystemSupported TokensTransfer Method
EVMAny ERC-20 tokenEIP-3009 or Permit2
SolanaAny SPL or Token-2022 tokenSPL Transfer
TON (TVM)Any TEP-74 jetton (e.g., USDT)Signed W5R1 internal message
StellarAny Soroban token implementing SEP-41transfer(from, to, amount)
AptosAny fungible assetprimary_fungible_store::transfer
HederaHBAR or any HTS fungible tokenHedera Transfer Transaction
Facilitators support networks, not specific tokens — any compatible token works on any facilitator that supports that network.

EVM: Asset Transfer Methods

x402 supports two asset transfer methods on EVM, selected automatically based on token capabilities:
MethodWhen UsedHow It Works
EIP-3009Tokens with transferWithAuthorization (e.g., USDC)Single off-chain signature, simplest flow
Permit2Any ERC-20 tokenUses Uniswap’s Permit2 contract + x402ExactPermit2Proxy
Both methods provide gasless transfers (facilitator sponsors gas), signature-based authorization, and secure payments. EIP-3009 is preferred when available (simpler, no approval step). Permit2 serves as the universal fallback. Permit2 approval: Requires a one-time onchain approval. x402 supports two gas sponsoring extensions that make this step gasless — see EIP-2612 Gas Sponsoring and ERC-20 Approval Gas Sponsoring.

EVM: Batch settlement (batch-settlement)

For high-frequency or repeated micropayment flows where settling every request onchain is too costly, x402 supports the batch-settlement scheme on EVM: the buyer deposits once into an escrow contract, signs off-chain vouchers per request, and sellers redeem in batches onchain. Per-request pricing still uses an up-to ceiling (PaymentRequirements.amount); actual charges can vary per request within that limit—see Batch settlement.

Specifying Payment Amounts

When configuring payment requirements, you have two options:
  1. Price String (e.g., "$0.01") — The system uses the chain’s default stablecoin. Only works on chains with a configured default.
  2. TokenAmount — Specify exact amountInAtomicUnits + asset address. Works on any chain with no configuration needed.

Using Custom ERC-20 Tokens

To use a custom ERC-20 token, you need three key pieces of information:
  1. Token Address: The contract address of your ERC-20 token
  2. EIP-712 Name: The token’s name for EIP-712 signatures
  3. EIP-712 Version: The token’s version for EIP-712 signatures
You can retrieve these from any block explorer:
  1. Name: Read the name() function - Example on Basescan
  2. Version: Read the version() function - Example on Basescan
These values are used in the eip712 nested object when configuring TokenAmount:
{
  eip712: {
    name: "USD Coin",    // From name() function
    version: "2"         // From version() function
  }
}

Default Assets for Dollar-String Pricing

When you use "$0.01" syntax, x402 needs to know which stablecoin to use. The following chains have pre-configured defaults. For chains not listed, use registerMoneyParser() or specify the price directly as a TokenAmount with amountInAtomicUnits. To contribute a new default asset, see Contributing a New Default Asset below.

EVM

ChainCAIP-2Token AddressEIP-712 NameDecimalsTransfer Method
Baseeip155:84530x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913USD Coin6EIP-3009
Base Sepoliaeip155:845320x036CbD53842c5426634e7929541eC2318f3dCF7eUSDC6EIP-3009
Polygoneip155:1370x3c499c542cEF5E3811e1192ce70d8cC03d5c3359USD Coin6EIP-3009
Arbitrum Oneeip155:421610xaf88d065e77c8cC2239327C5EDb3A432268e5831USD Coin6EIP-3009
Arbitrum Sepoliaeip155:4216140x75faf114eafb1BDbe2F0316DF893fd58CE46AA4dUSD Coin6EIP-3009
Monadeip155:1430x754704Bc059F8C67012fEd69BC8A327a5aafb603USD Coin6EIP-3009
Stableeip155:9880x779Ded0c9e1022225f8E0630b35a9b54bE713736USDT06EIP-3009
Stable Testneteip155:22010x78Cf24370174180738C5B8E352B6D14c83a6c9A9USDT06EIP-3009
MegaETHeip155:43260xFAfDdbb3FC7688494971a79cc65DCa3EF82079E7MegaUSD18Permit2 + EIP-2612
Mezo Testneteip155:316110x118917a40FAf1CD7a13dB0Ef56C86De7973Ac503Mezo USD18Permit2 + EIP-2612
Radiuseip155:7234870x33ad9e4BD16B69B5BFdED37D8B5D9fF9aba014FbStable Coin6Permit2 + EIP-2612
Radius Testneteip155:723440x33ad9e4BD16B69B5BFdED37D8B5D9fF9aba014FbStable Coin6Permit2 + EIP-2612
ADI Chaineip155:369000x9cb8142aEBBcdc60AF7c97Af897A67A8f3CA71C2USDC.e6EIP-3009
HPPeip155:1904150x401eCb1D350407f13ba348573E5630B83638E30DBridged USDC6EIP-3009
HPP Sepoliaeip155:1812280x401eCb1D350407f13ba348573E5630B83638E30DBridged USDC6EIP-3009

Solana (SVM)

ChainCAIP-2Token MintDecimals
Solana Mainnetsolana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v (USDC)6
Solana Devnetsolana:EtWTRABZaYq6iMfeYKouRu166VU2xqa14zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU (USDC)6

TON (TVM)

ChainCAIP-2Jetton MinterDecimals
TON Mainnettvm:-239EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs (USDT)6
TON Testnettvm:-3kQDNUDJC0iQvJoZp0ml-YteL1NtTXKphU03CTI5v4VtBhGYs (USDT)6

Algorand (AVM)

ChainCAIP-2ASA IDDecimals
Algorand Mainnetalgorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=31566704 (USDC)6
Algorand Testnetalgorand:SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=10458941 (USDC)6

Stellar

ChainCAIP-2Token ContractDecimals
Stellar Pubnetstellar:pubnetCCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75 (USDC)7
Stellar Testnetstellar:testnetCBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA (USDC)7

Aptos

ChainCAIP-2Fungible Asset AddressDecimals
Aptos Mainnetaptos:10xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b (USDC)6
Aptos Testnetaptos:20x69091fbab5f7d635ee7ac5098cf0c1efbe31d68fec0f2cd565e8d168daf52832 (USDC)6

Hedera

ChainCAIP-2Token IDDecimals
Hedera Mainnethedera:mainnet0.0.456858 (USDC)6
Hedera Testnethedera:testnet0.0.429274 (USDC)6
HBAR (native token) is also supported using asset ID 0.0.0, with amounts in tinybars (1 HBAR = 10⁸ tinybars).

Adding Support for New Networks

There are two distinct paths, depending on your goal:
  1. Runtime Registration — use any network in your own server code without modifying the x402 source. No PR required.
  2. Contributing a New Default Asset — upstream a chain so it appears in the default-asset tables above and supports "$0.01" dollar-string pricing out of the box. Requires a PR updating the TypeScript, Go, and Python SDK registries.

Runtime Registration

x402 uses dynamic network registration — you can support any EVM network without modifying source files.
import { x402ResourceServer, HTTPFacilitatorClient } from "@x402/core/server";
import { ExactEvmScheme } from "@x402/evm/exact/server";

const facilitatorClient = new HTTPFacilitatorClient({
  url: "https://your-facilitator.com"  // Facilitator that supports your network
});

const server = new x402ResourceServer(facilitatorClient);
server.register("eip155:*", new ExactEvmScheme());

const routes = {
  "GET /api/data": {
    accepts: [{
      scheme: "exact",
      price: "$0.001",
      network: "eip155:43114",  // Avalanche mainnet
      payTo: "0xYourAddress",
    }],
  },
};
Key Points:
  • Use CAIP-2 format: eip155:<chainId> for any EVM network
  • The scheme implementation handles the network automatically
  • You only need a facilitator that supports your target network (or run your own)

Contributing a New Default Asset

To add a chain to the default-asset tables above so that dollar-string pricing ("$0.01") works out of the box, open a PR against x402-foundation/x402. Follow the cross-SDK walkthrough in DEFAULT_ASSETS.md, which names every file in the TypeScript, Go, and Python registries that must be updated.

Facilitators

Network support in x402 depends on which facilitator you use. See Facilitators for recommended production options.

x402.org Facilitator

  • Supports: eip155:84532 (Base Sepolia), solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 (Solana Devnet), stellar:testnet (Stellar Testnet), aptos:2 (Aptos Testnet)
  • Notes: Recommended for testing and development. This is the default facilitator in the x402 packages and requires no setup.

Production Facilitators

Multiple production-ready facilitators are available supporting various networks including Base, Solana, Polygon, Avalanche, and more. See Facilitators for available options.

Quick Reference

Facilitator TypeNetworks SupportedProduction ReadyRequirements
x402.org (Default)eip155:84532, solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1, stellar:testnet, aptos:2Testnet onlyNone
Production FacilitatorsVarious (Base, Solana, Polygon, Avalanche, etc.)YesVaries
Self-hostedAny networkYesTechnical setup

Running Your Own Facilitator

If you need immediate support or want to test before contributing, you can run your own facilitator. Video Guide: Adding EVM Chains to x402 Prerequisites
  1. Access to an RPC endpoint for your target network
  2. A wallet with native tokens for gas sponsorship
  3. The x402 facilitator code

Getting Help

Summary

Key takeaways:
  • Any EVM chain is supported via eip155:<chainId> — plus Solana, TON (TVM), Algorand, Stellar, Aptos, and Hedera
  • Default assets are a convenience for "$0.01" dollar-string pricing; explicit TokenAmount works on any chain
  • Any ERC-20 token works on any EVM facilitator (via EIP-3009 or Permit2)
  • CAIP-2 identifiers provide unambiguous cross-chain support
Next, explore: