Skip to main content

What is a Facilitator?

Think of a facilitator as your payment assistant - it sits between clients and servers, verifying payments and settling them on-chain so you don’t have to deal with blockchain nodes, gas fees, or settlement complexity. The simple version: Clients sign payments, facilitators verify them and post them to the blockchain. Everyone’s happy.

Why Use a Facilitator?

Zero Blockchain Hassle

No need to run nodes, manage RPC endpoints, or worry about gas prices

Instant Verification

Check if payments are valid in milliseconds without waiting for blocks

Standardized Flow

Consistent verification and settlement across all x402 implementations

No Custody Risk

Facilitators never hold your funds - they just execute signed authorizations

How It Works

The facilitator handles two critical jobs in the x402 payment flow:
1

Payment Verification

Client sends a signed payment. Facilitator checks:
  • Is the signature valid?
  • Does the amount match what’s required?
  • Has this nonce been used before?
  • Is there enough balance?
2

On-Chain Settlement

After verification, facilitator submits the payment to the blockchain:
  • Executes the EIP-3009 transferWithAuthorization
  • Pays the gas fees (not you!)
  • Returns transaction confirmation

The 402.cat Facilitator

We’ve launched our own facilitator built in Rust with x402-rs. It’s fast, reliable, and handles all the payment complexity for you.

Endpoints

Our facilitator exposes these HTTP endpoints:
EndpointMethodPurpose
/verifyPOSTVerify a payment signature without settling
/settlePOSTVerify and settle a payment on-chain
/healthGETCheck if facilitator is healthy
/supportedGETList supported networks and tokens

Example: Verifying a Payment

POST https://facilitator.402.cat/verify
Content-Type: application/json

{
  "version": 2,
  "network": "eip155:84532",
  "authorization": {
    "from": "0xUserWallet...",
    "to": "0xRecipient...",
    "value": "100000",  // $0.10 USDC
    "validAfter": 0,
    "validBefore": "115792089...",
    "nonce": "0xUnique...",
    "v": 27,
    "r": "0x...",
    "s": "0x..."
  }
}
Response (Valid):
{
  "isValid": true,
  "payer": "0xUserWallet..."
}
Response (Invalid):
{
  "isValid": false,
  "invalidReason": "INSUFFICIENT_BALANCE",
  "invalidReasonDetails": "Account balance is 0.05 USDC, required 0.10 USDC",
  "payer": "0xUserWallet..."
}

Example: Settling a Payment

POST https://facilitator.402.cat/settle
Content-Type: application/json

{
  "version": 2,
  "network": "eip155:84532",
  "authorization": {
    // ... same payment structure as verify
  }
}
Response (Success):
{
  "success": true,
  "network": "eip155:84532",
  "transaction": "0xTransactionHash...",
  "payer": "0xUserWallet..."
}
Response (Failure):
{
  "success": false,
  "network": "eip155:84532",
  "transaction": "",
  "errorReason": "INVALID_SIGNATURE",
  "errorReasonDetails": "Signature verification failed",
  "payer": "0xUserWallet..."
}

Payment Flow with Facilitator

Here’s how a typical x402 payment flows through the facilitator:

Security Model

No. Facilitators can only execute the exact authorization you signed. They cannot:
  • Change the amount
  • Change the recipient
  • Reuse signatures (nonce protection)
  • Access funds beyond what you authorized
Your funds are safe. The worst case is that:
  • Payments won’t verify temporarily
  • Settlements won’t execute
  • You can switch to another facilitator
Your signed authorizations remain valid and can be submitted by any facilitator or even directly on-chain.
Never. Facilitators only see:
  • Your wallet address (public)
  • Signed authorizations (public data + signature)
  • Transaction amounts (transparent)
Private keys never leave your device.
Facilitators submit transactions on your behalf, which means:
  • They choose gas prices
  • They can see pending payments
  • Settlement timing is in their control (usually 300ms delay)
For MEV-sensitive operations, use shielded swaps ($1 fee) which use private mempools.

Multiple Facilitators

402.cat supports round-robin across multiple facilitators for high availability:
FacilitatorNetworkStatusSpecial Features
402.catBase, Base SepoliaPrimaryOur in-house Rust implementation
PayAIMulti-chainActiveSolana, Base, Polygon support
Coinbase CDPBaseActiveEnterprise-grade (API key required)
If one facilitator is down, the system automatically tries the next.

Building with Facilitators

Option 1: Use Our CLI (Easiest)

# CLI handles everything automatically
httpcat buy MOON 0.10

# Behind the scenes:
# 1. Gets 402 response with facilitator info
# 2. Signs payment locally
# 3. Retries request with payment header
# 4. Server uses facilitator to verify/settle

Option 2: Direct Integration

import { x402Client } from '@402/client';

const client = new x402Client({
  privateKey: process.env.PRIVATE_KEY,
  facilitator: 'https://facilitator.402.cat'
});

// Client handles 402 → sign → verify → settle flow
const response = await client.post('/entrypoints/token_buy_0_10/invoke', {
  identifier: 'MOON',
  amount: 0.10
});

Option 3: Manual Facilitator Calls

// 1. Get payment requirements
const initial = await fetch('https://agent.402.cat/tokens/buy', {
  method: 'POST',
  body: JSON.stringify({ symbol: 'MOON', amount: 0.10 })
});

if (initial.status === 402) {
  const { cost, facilitator, nonce } = await initial.json();

  // 2. Sign payment
  const signature = signEIP3009Authorization({
    from: myWallet,
    to: facilitator,
    value: parseUnits(cost, 6), // USDC has 6 decimals
    nonce
  });

  // 3. Retry with payment
  const response = await fetch('https://agent.402.cat/tokens/buy', {
    method: 'POST',
    headers: {
      'PAYMENT-SIGNATURE': btoa(JSON.stringify({
        version: 2,
        network: 'eip155:84532',
        authorization: signature
      }))
    },
    body: JSON.stringify({ symbol: 'MOON', amount: 0.10 })
  });
}

Error Handling

The facilitator returns structured errors to help debug payment issues:
Error ReasonDescriptionFix
INSUFFICIENT_BALANCENot enough USDC in walletTop up USDC balance
INVALID_SIGNATURESignature doesn’t matchCheck signing logic
NONCE_ALREADY_USEDPayment already processedGet fresh nonce from 402 response
AMOUNT_MISMATCHSigned amount ≠ required amountSign correct amount
NETWORK_MISMATCHWrong blockchain networkUse correct CAIP-2 network ID
ONCHAIN_FAILUREBlockchain rejected transactionCheck gas, balance, network status

Performance

Our facilitator is optimized for speed:
  • Verification: < 100ms (signature + balance check)
  • Settlement: ~2-5 seconds (depends on blockchain)
  • Uptime: 99.9% target
  • Rate limits: 1000 requests/min per IP

Supported Networks

Check which networks a facilitator supports:
curl https://facilitator.402.cat/supported
Response:
{
  "networks": [
    {
      "caip2": "eip155:84532",
      "name": "Base Sepolia",
      "nativeCurrency": "ETH",
      "tokens": [
        {
          "symbol": "USDC",
          "address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
          "decimals": 6
        }
      ]
    },
    {
      "caip2": "eip155:8453",
      "name": "Base",
      "nativeCurrency": "ETH",
      "tokens": [
        {
          "symbol": "USDC",
          "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "decimals": 6
        }
      ]
    }
  ]
}

Next Steps

Facilitators make x402 payments feel instant and gasless from the user’s perspective. They handle all the blockchain complexity so you can focus on building great products.