Skip to main content

V2 Network Identifiers (CAIP-2)

x402 V2 uses CAIP-2 standard network identifiers for unambiguous cross-chain support. This format follows the pattern namespace:reference.

Network Identifier Reference

V1 NameV2 CAIP-2 IDChain IDDescription
baseeip155:84538453Base mainnet
base-sepoliaeip155:8453284532Base Sepolia testnet
solanasolana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp-Solana mainnet
solana-devnetsolana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1-Solana Devnet
-aptos:11Aptos Mainnet
-aptos:22Aptos Testnet
-stellar:pubnet-Stellar Mainnet
-stellar:testnet-Stellar Testnet
avalancheeip155:4311443114Avalanche C-Chain mainnet
avalanche-fujieip155:4311343113Avalanche Fuji testnet
polygoneip155:137137Polygon mainnet
polygon-amoyeip155:8000280002Polygon Amoy testnet
seieip155:13291329Sei mainnet
sei-testneteip155:713715713715Sei testnet
skale-baseeip155:11879479331187947933SKALE mainnet
skale-base-sepoliaeip155:324705682324705682SKALE testnet

Format Explanation

  • EVM networks: eip155:<chainId> where chainId is the numeric chain identifier
  • Solana: solana:<genesisHash> where genesisHash is the first 32 bytes of the genesis block hash
  • Stellar: stellar:<network> where network is pubnet (mainnet) or testnet
  • Aptos: aptos:<chainId> where chainId is the numeric chain identifier

Overview

x402 is designed to work across multiple blockchain networks, with different levels of support depending on the facilitator being used. The protocol itself is network-agnostic, but facilitators need to implement network-specific logic for payment verification and settlement.

Supported Facilitators

Network support in x402 depends on which facilitator you use. For a complete and up-to-date list of available facilitators and their supported networks, see the x402 Ecosystem.

x402.org Facilitator

  • Supports: eip155:84532 (Base Sepolia), solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 (Solana Devnet)
  • 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 and their documentation.

Token Support

x402 supports tokens on EVM, Solana, Stellar, and Aptos networks:
  • EVM: Any ERC-20 token (via EIP-3009 or Permit2)
  • Solana: Any SPL or token-2022 token
  • Stellar: Any Soroban token implementing SEP-41
  • Aptos: Any fungible asset using Aptos’s native fungible asset framework
Important: Facilitators support networks, not specific tokens — any ERC-20 token works on EVM networks (via EIP-3009 or Permit2), any SPL/token-2022 token works on Solana, any SEP-41 token works on Stellar, and any fungible asset works on Aptos, for the facilitators that support those networks.

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: The facilitator sponsors gas for the payment itself. For Permit2, the one-time approval step can also be made gasless via optional gas sponsoring extensions
  • Signature-based authorization: Users sign transfer authorizations off-chain
  • Secure payments: Transfers are authorized by cryptographic signatures
EIP-3009 is preferred when available (simpler, no approval step). Permit2 serves as the universal fallback, enabling any ERC-20 token to work with x402. Permit2 approval: Permit2 requires a one-time on-chain approval of the Permit2 contract. 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 infers USDC as the token
  2. TokenAmount - Specify exact atomic units of any ERC-20 token

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
Finding Token Information on Basescan You can retrieve the required EIP-712 values 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
  }
}

Solana: SPL Tokens & Token 2022 Tokens

On Solana, x402 supports all SPL tokens and Token 2022 tokens. When using facilitators that support Solana or Solana Devnet, payments can be made in any SPL/token-2022 token, including USDC (SPL). No EIP-712 configuration is required on Solana.

Stellar: Soroban Tokens

On Stellar, x402 supports all Soroban tokens implementing SEP-41. Payments use the transfer(from, to, amount) function. The TypeScript SDK supports sponsored transactions where facilitators pay gas fees on behalf of clients. Stellar uses ledger-based expiration (default ~12 ledgers ≈ 60 seconds) instead of timestamps.

Aptos: Fungible Assets

On Aptos, x402 supports all fungible assets using Aptos’s native fungible asset framework. Payments use the primary_fungible_store::transfer function for automatic store creation and management. The TypeScript SDK supports sponsored transactions where facilitators pay gas fees on behalf of clients.

Default Tokens

Each network defines its own default token. When you use a price string (e.g., "$0.01"), the system uses the network’s configured default. USDC is the default on most EVM networks because it implements EIP-3009 (simplest flow) and is widely available, but other networks may define different defaults.

Why EIP-3009 + Permit2?

These two transfer methods together give x402 full ERC-20 coverage on EVM:
  1. Gas abstraction: Buyers don’t need native tokens (ETH, MATIC, etc.) for gas
  2. EIP-3009: One-step payments with no approval needed — ideal for tokens like USDC
  3. Permit2: Universal fallback for any ERC-20 token, with optional gas-sponsored approval via extensions

Quick Reference

Facilitator TypeNetworks SupportedProduction ReadyRequirements
x402.org (Default)eip155:84532, solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1Testnet onlyNone
Production FacilitatorsVarious (Base, Solana, Polygon, Avalanche, etc.)YesVaries
Self-hostedAny EVM network (CAIP-2 format)YesTechnical setup
Note: On EVM networks, facilitators support any ERC-20 token (via EIP-3009 or Permit2); on Solana, facilitators support any SPL/Token-2022 token.

Adding Support for New Networks

x402 V2 uses dynamic network registration - you can support any EVM network without modifying source files. In V2, networks are supported through the registration pattern using CAIP-2 identifiers. No source code changes are required:
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());  // Registers wildcard support for all EVM chains

// Now use any CAIP-2 network identifier in your routes:
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)

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

Future Network Support

The x402 ecosystem is actively expanding network support. Planned additions include:
  • Additional L2 networks
  • Additional non-EVM chain support
  • Cross-chain payment capabilities

Getting Help

For help with network integration:

Summary

x402’s network support is designed to be extensible while maintaining security and reliability. Whether you’re using the default Base Sepolia (eip155:84532) setup for testing or running your own facilitator for custom networks, the protocol provides flexibility for various use cases. Key takeaways:
  • Base (eip155:8453), Base Sepolia (eip155:84532), Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), and Solana Devnet (solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1) have the best out-of-the-box support
  • Any EVM network can be supported with a custom facilitator using CAIP-2 format
  • Any ERC-20 token works on any facilitator (via EIP-3009 or Permit2)
  • Use price strings for USDC or TokenAmount for custom tokens
  • Network choice affects gas costs and payment economics
  • V2 uses CAIP-2 network identifiers for unambiguous cross-chain support
Next, explore: