Skip to main content

Supported Networks

0xmeta.ai supports payment verification and settlement on Base networks:

Base Mainnet

Production Native: ETH Block Time: ~2s

Base Sepolia

Testnet Native: ETH For testing

Chain Identifiers

Use these exact values in the chain parameter:
NetworkIdentifierType
Base MainnetbaseMainnet
Base Sepoliabase-sepoliaTestnet
// Correct ✅
{
  chain: "base";
}
{
  chain: "base-sepolia";
}

// Wrong ❌
{
  chain: "BASE";
}
{
  chain: "Base";
}
{
  chain: "base_mainnet";
}

Basic Example

async function verifyPayment(txHash, chain, amount) {
  const response = await fetch("https://facilitator.api.0xmeta.ai/v1/verify", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-API-Key": "your_api_key",
      "Idempotency-Key": `verify_${txHash}`,
    },
    body: JSON.stringify({
      transaction_hash: txHash,
      chain: chain, // "base" or "base-sepolia"
      seller_address: YOUR_ADDRESS,
      expected_amount: amount,
    }),
  });

  return await response.json();
}

// Use with Base Mainnet
await verifyPayment("0x...", "base", "1000000000000000000");

// Use with Base Sepolia Testnet
await verifyPayment("0x...", "base-sepolia", "1000000000000000000");

Base Mainnet

  • Pros: Production-ready, very fast, very low fees, Coinbase-backed
  • Cons: Real funds at risk
  • Best for: Production applications
  • Confirmation time: 2-5 seconds
{
  "chain": "base",
  "expected_amount": "1000000000000000000"  // 1 ETH
}

Base Sepolia Testnet

  • Pros: Free test tokens, safe for development
  • Cons: Not for production use
  • Best for: Testing and development
  • Confirmation time: 2-5 seconds
{
  "chain": "base-sepolia",
  "expected_amount": "1000000000000000000"  // 1 test ETH
}

Token Support

Both networks support both native tokens (ETH) and ERC20 tokens:

Native Tokens (ETH)

{
  "chain": "base",
  "expected_token": null,  // null = native token
  "expected_amount": "1000000000000000000"
}

ERC20 Tokens (USDC, DAI, etc.)

{
  "chain": "base",
  "expected_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",  // USDC on Base
  "expected_amount": "1000000"  // 1 USDC (6 decimals)
}

Common Token Addresses on Base

USDC

NetworkAddress
Base Mainnet0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Base Sepolia0x036CbD53842c5426634e7929541eC2318f3dCF7e

DAI

NetworkAddress
Base Mainnet0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb
Base SepoliaCheck testnet token list

Testing on Base Sepolia

Use Base Sepolia for testing:
const config = {
  development: {
    chain: "base-sepolia",
    sellerAddress: process.env.DEV_ADDRESS,
  },
  production: {
    chain: "base",
    sellerAddress: process.env.PROD_ADDRESS,
  },
};

const { chain, sellerAddress } = config[process.env.NODE_ENV];
Get testnet ETH:

Environment Configuration

1. Let Users Choose Network

const SUPPORTED_CHAINS = [
  { id: "base", name: "Base Mainnet", native: "ETH" },
  { id: "base-sepolia", name: "Base Sepolia", native: "ETH" },
];

// Let user select chain
<select onChange={(e) => setChain(e.target.value)}>
  {SUPPORTED_CHAINS.map((chain) => (
    <option key={chain.id} value={chain.id}>
      {chain.name}
    </option>
  ))}
</select>;

2. Chain-Aware Amounts

function getChainDecimals(chain, isNativeToken) {
  if (isNativeToken) {
    return 18; // ETH uses 18 decimals
  }

  // Token-specific decimals
  const tokenDecimals = {
    USDC: 6,
    USDT: 6,
    DAI: 18,
  };

  return tokenDecimals[tokenName] || 18;
}

3. Display Chain Info

const response = await verifyPayment(txHash, chain, amount);

console.log(`Payment verified on ${chain}`);
console.log(`View on explorer: ${getExplorerUrl(chain, txHash)}`);

function getExplorerUrl(chain, txHash) {
  const explorers = {
    base: "https://basescan.org/tx/",
    "base-sepolia": "https://sepolia.basescan.org/tx/",
  };

  return explorers[chain] + txHash;
}

Why Base?

Base has 100x lower fees than Ethereum mainnet, making it perfect for high-frequency transactions
Base settles in seconds vs minutes on Ethereum mainnet
Built by Coinbase, Base offers enterprise-grade reliability and security
Full EVM compatibility means you can use existing Ethereum tooling and contracts
All Base networks use the same API - just change the chain parameter between base and base-sepolia!