Skip to main content
Visit x402scan for a complete, up-to-date directory of all facilitators.

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. x402 offers three facilitator models for EVM and Solana networks:
This is the official Coinbase Developer Platform (CDP) documentation. Community-maintained documentation can be found at x402.gitbook.io/x402.Need more help? Join the x402 Discord for the latest updates.

Supported facilitators

Network support in x402 depends on which facilitator you use:
FacilitatorNetworks SupportedProduction ReadyRequirements
Community-maintainedBase and Solana (testnet only)❌ Testnet onlyNone
CDP-hostedBase and SolanaCDP API keys
Self-hostedAny EVM or Solana networkAdditional setup
All facilitators support any EIP-3009 compatible token on their supported networks.
The CDP-hosted facilitator is the recommended way to get started with x402. It is production-ready and has best-in-class KYT/OFAC compliance checks.
  • Supports: Base, Base Sepolia, Solana, Solana Devnet
  • Notes: Production-ready facilitator with best-in-class KYT/OFAC compliance checks. Fee-free USDC settlement. Requires CDP API keys for mainnet use.
  • Requirements: CDP account and API keys from cdp.coinbase.com, see Quickstart for Sellers: Running on Mainnet for details.
  • Unique Benefits:
    • Enterprise-grade compliance and security
    • Direct integration with CDP ecosystem
    • Priority support and SLAs available
    • Automatic service discovery in x402 Bazaar

Community-maintained facilitator

The Community-maintained facilitator is recommended for testing and development. It is the default facilitator in the x402 packages and requires no setup.
  • Supports: Base Sepolia, Solana Devnet
  • Notes: Recommended for testing and development. This is the default facilitator in the x402 packages and requires no setup.

Self-hosted

Run your own facilitator for full control and customization. Supports networks like Avalanche, Polygon, Arbitrum, and other EVM-compatible chains.
  • Supports: Any EVM network, Solana networks
  • Notes: Run your own facilitator for full control and customization. Supports networks like Avalanche, Polygon, Arbitrum, and other EVM-compatible chains.
  • Setup: See Adding support for new networks below

Token support

Facilitators support networks, not specific tokens.
Token TypeNetworkConfiguration
USDC (default)EVM and SolanaPrice strings (e.g., "$0.01")
Custom ERC-20 with EIP-3009EVMTokenAmount with EIP-712 details
SPL tokensSolanaNo EIP-712 required
Token-2022SolanaNo EIP-712 required
To use a custom EIP-3009 token on EVM, you need:
  1. Token contract address
  2. EIP-712 name - Read from the name() function on Basescan
  3. EIP-712 version - Read from the version() function on Basescan
Example configuration:
{
  eip712: {
    name: "USD Coin",    // From name() function
    version: "2"         // From version() function
  }
}
Why EIP-3009?
  • Gasless transfers (facilitator sponsors gas)
  • Signature-based authorization (off-chain signing)
  • One-step payments (no separate approvals)
  • Token programs: TOKEN_PROGRAM_ADDRESS (SPL), TOKEN_2022_PROGRAM_ADDRESS (Token-2022)
  • Fee sponsorship: Facilitator provides feePayer in paymentRequirements.extra and signs the transaction to cover fees
  • No EIP-712: Unlike EVM, Solana tokens don’t require EIP-712 configuration

Adding support for new networks

There are two ways to add support for new EVM networks in x402:

Option 1: Contributing to x402 packages

You can add official network support by submitting a PR to the x402 repository. This makes your network available to all x402 users.

Files to modify

  1. typescript/packages/x402/src/types/shared/evm/config.ts Add your network’s chain ID and USDC address:
    // Example: Adding Avalanche networks
    "43113": {  // Avalanche Fuji testnet chain ID
      usdcAddress: "0x5425890298aed601595a70AB815c96711a31Bc65",
      usdcName: "USD Coin",
    },
    "43114": {  // Avalanche mainnet chain ID
      usdcAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
      usdcName: "USDC",
    },
    
  2. typescript/packages/x402/src/types/shared/network.ts Add your network to the schema and mappings:
    // Update the NetworkSchema enum
    export const NetworkSchema = z.enum(["base-sepolia", "base", "avalanche-fuji", "avalanche"]);
    
    // Add to SupportedEVMNetworks array
    export const SupportedEVMNetworks: Network[] = [
      "base-sepolia",
      "base",
      "avalanche-fuji",
      "avalanche",
    ];
    
    // Add to EvmNetworkToChainId mapping
    ["avalanche-fuji", 43113],
    ["avalanche", 43114],
    
  3. typescript/packages/x402/src/types/shared/evm/wallet.ts - Update getChainFromNetwork function Add your network to the getChainFromNetwork function to map your network string to the viem chain object:
    import { avalanche, avalancheFuji } from "viem/chains";
    
    // Add your network to the switch statement in getChainFromNetwork
    case "avalanche":
      return avalanche;
    case "avalanche-fuji":
      return avalancheFuji;
    

Key requirements

  • Network key: Use a consistent network identifier (e.g., avalanche-fuji) across all files
  • Viem chain: Your network must be available in viem/chains or you’ll need to define it manually
  • USDC address: Must be EIP-3009 compatible (has transferWithAuthorization function)
  • Chain ID: Use your network’s official chain ID in the config
  • Consistency: Ensure the network name matches across NetworkSchema, SupportedEVMNetworks, EvmNetworkToChainId, and the getChainFromNetwork switch statement

Option 2: 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

Additional network support

If you need support for networks not currently available through CDP’s facilitator:
  1. Submit a request: Contact CDP support or post in the x402 Discord to express interest in specific networks
  2. Run your own facilitator: See the self-hosting guide above for immediate support of any EVM network
  3. Contribute to x402: Submit a PR to add official support for new networks in the x402 packages
CDP is actively working to expand network support based on developer demand.
Need help with network integration?Join the x402 Discord community or check the x402 GitHub repository.