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
base-sepoliaeip155:8453284532Base Sepolia testnet
baseeip155:84538453Base mainnet
solana-devnetsolana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1-Solana Devnet
solanasolana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp-Solana Mainnet

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

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 both EVM and Solana networks:
  • EVM: Any ERC-20 token that implements the EIP-3009 standard
  • Solana: Any SPL or token-2022 token
Important: Facilitators support networks, not specific tokens — any EIP-3009 compatible token works on EVM networks, and any SPL/token-2022 token works on Solana, for the facilitators that support those networks.

EVM: EIP-3009 Requirement

Tokens must implement the transferWithAuthorization function from the EIP-3009 standard. This enables:
  • Gasless transfers: The facilitator sponsors gas fees
  • Signature-based authorization: Users sign transfer authorizations off-chain
  • Secure payments: Transfers are authorized by cryptographic signatures

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 EIP-3009 token

Using Custom EIP-3009 Tokens

To use a custom EIP-3009 token, you need three key pieces of information:
  1. Token Address: The contract address of your EIP-3009 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.

USDC - The Default Token

  • Status: Supported by default across all networks
  • Why: USDC implements EIP-3009 and is widely available
  • Networks: Available on eip155:8453 (Base), eip155:84532 (Base Sepolia), and all supported networks

Why EIP-3009?

The EIP-3009 standard is essential for x402 because it enables:
  1. Gas abstraction: Buyers don’t need native tokens (ETH, MATIC, etc.) for gas
  2. One-step payments: No separate approval transactions required
  3. Universal facilitator support: Any EIP-3009 token works with any facilitator

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 EIP-3009 compatible token; 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 { registerExactEvmScheme } from "@x402/evm/exact/server";

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

const server = new x402ResourceServer(facilitatorClient);
registerExactEvmScheme(server);  // 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) and Base Sepolia (eip155:84532) have the best out-of-the-box support
  • Any EVM network can be supported with a custom facilitator using CAIP-2 format
  • Any EIP-3009 token (with transferWithAuthorization) works on any facilitator
  • 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: