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)
  • Algorand: algorand:<genesisHash> (base64-encoded genesis hash)
  • Stellar: stellar:<network> (pubnet or testnet)
  • Aptos: aptos:<chainId> (e.g., aptos:1 for mainnet)

Token Support

x402 supports tokens on EVM, Solana, Stellar, and Aptos networks:
EcosystemSupported TokensTransfer Method
EVMAny ERC-20 tokenEIP-3009 or Permit2
SolanaAny SPL or Token-2022 tokenSPL Transfer
StellarAny Soroban token implementing SEP-41transfer(from, to, amount)
AptosAny fungible assetprimary_fungible_store::transfer
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 on-chain approval. x402 supports two gas sponsoring extensions that make this step gasless — see EIP-2612 Gas Sponsoring and ERC-20 Approval Gas Sponsoring.

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

Solana (SVM)

ChainCAIP-2Token MintDecimals
Solana Mainnetsolana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v (USDC)6
Solana Devnetsolana:EtWTRABZaYq6iMfeYKouRu166VU2xqa14zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU (USDC)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

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. For a complete list, see the x402 Ecosystem.

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 the x402 Ecosystem 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, Stellar, and Aptos
  • 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: