Skip to Content
🚀 {xpay✦} is building the future of x402 payments - Join the developer beta →
x402 Protocolxpay Facilitator

xpay Facilitator

Officially listed in the x402 ecosystem — xpay is listed alongside Coinbase CDP, thirdweb, and 20+ facilitators in the x402 ecosystem directory . See PR #1248 .

xpay operates a public x402 facilitator service at https://facilitator.xpay.sh. It handles USDC payment verification and settlement on Base, supporting both mainnet and testnet.

Key Features

FeatureDetail
Protocol feesZero — no fees for verify or settle
Gas sponsorshipxpay pays gas (~$0.0001/tx on Base)
AuthenticationNone required — fully permissionless
CustodyNon-custodial — USDC flows buyer → seller
Protocol versionsx402 v1 and v2
NetworksBase mainnet + Base Sepolia testnet
LatencySub-second (~200ms warm)

What is a Facilitator?

In the x402 protocol, a facilitator is a trusted intermediary that:

  1. Verifies payment authorizations are valid and well-formed
  2. Settles payments by submitting transferWithAuthorization (EIP-3009) transactions on-chain
  3. Reports which networks and tokens it supports

The facilitator never holds or custodies funds. Payments flow directly from buyer to seller via signed USDC authorization.

Endpoints

MethodPathDescription
GET/healthHealth check
GET/supportedList supported networks and tokens
POST/verifyVerify a payment authorization
POST/settleSettle (execute) a payment on-chain

Base URL: https://facilitator.xpay.sh

GET /health

Returns the service status.

curl https://facilitator.xpay.sh/health
{ "status": "ok" }

GET /supported

Returns the networks and x402 protocol versions supported by this facilitator.

curl https://facilitator.xpay.sh/supported
{ "supportedNetworks": [ { "networkId": "eip155:8453", "version": "v2" }, { "networkId": "eip155:84532", "version": "v2" }, { "networkId": "base", "version": "v1" }, { "networkId": "base-sepolia", "version": "v1" } ] }

POST /verify

Verifies that a payment authorization is valid without executing it. Use this to confirm a buyer’s payment before granting access to a resource.

Request body: The x402 payment payload (as specified by the x402 protocol).

curl -X POST https://facilitator.xpay.sh/verify \ -H "Content-Type: application/json" \ -d '{ "payment": "...", "paymentPayload": { ... } }'

Response:

{ "valid": true }

Or on failure:

{ "valid": false, "reason": "Payment authorization expired" }

POST /settle

Settles a verified payment by submitting the transferWithAuthorization transaction on-chain. The USDC transfers directly from the buyer’s wallet to the seller’s wallet.

Gas-sponsored settlement: xpay pays the gas fee for every settlement transaction. Sellers receive the full USDC amount with zero deductions. On Base L2, gas costs approximately $0.0001 per transaction.

Request body: The x402 payment payload.

curl -X POST https://facilitator.xpay.sh/settle \ -H "Content-Type: application/json" \ -d '{ "payment": "...", "paymentPayload": { ... } }'

Response:

{ "settled": true, "txHash": "0x..." }

Supported Networks

NetworkChain IDx402 VersionToken
Base Mainneteip155:8453v2USDC
Base Sepoliaeip155:84532v2USDC
Base Mainnetbasev1 (legacy)USDC
Base Sepoliabase-sepoliav1 (legacy)USDC

Using the xpay Facilitator

In a Paywall Server

When building an x402-powered API, point your server to the xpay facilitator for payment verification and settlement:

import { wrapWithPaywall } from '@x402/express' const app = express() app.use( '/api/premium', wrapWithPaywall({ price: '$0.10', network: 'base', facilitatorUrl: 'https://facilitator.xpay.sh', receivingAddress: '0xYourWalletAddress', }) )

In a Client

When making requests to x402-protected resources, the facilitator URL is provided in the 402 response. Your client library handles the rest:

import { withX402 } from '@x402/fetch' const client = withX402(fetch, { walletPrivateKey: process.env.WALLET_KEY, }) // The client automatically pays via the facilitator specified in the 402 response const response = await client('https://api.example.com/premium-data')

Testing on Sepolia

Use Base Sepolia for development and testing. The xpay facilitator supports Sepolia with no configuration changes — just use Sepolia USDC and a Sepolia wallet.

app.use( '/api/test', wrapWithPaywall({ price: '$0.01', network: 'base-sepolia', facilitatorUrl: 'https://facilitator.xpay.sh', receivingAddress: '0xYourTestWallet', }) )

Comparison with Other Facilitators

FeaturexpayCoinbase CDPx402.org
Protocol fees0%0%0%
Gas sponsoredYesNoNo
AuthenticationNone (permissionless)API Key + OAuthNone
Non-custodialYesYesYes
x402 v1 + v2BothBothv1
TestnetBase SepoliaYesYes
OFAC complianceNoYesNo
Platform integrationSmart Proxy + Paywall + ObservabilityCDP ecosystemStandalone

Browse all facilitators in the x402 ecosystem directory  or compare them on the xpay facilitator page .

Rate Limits

  • Verify: 100 requests/minute
  • Settle: 50 requests/minute
  • Health/Supported: No limit

Resources


Learn more about the x402 Protocol or explore the Paywall Service to monetize your APIs.

Last updated on: