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
| Feature | Detail |
|---|---|
| Protocol fees | Zero — no fees for verify or settle |
| Gas sponsorship | xpay pays gas (~$0.0001/tx on Base) |
| Authentication | None required — fully permissionless |
| Custody | Non-custodial — USDC flows buyer → seller |
| Protocol versions | x402 v1 and v2 |
| Networks | Base mainnet + Base Sepolia testnet |
| Latency | Sub-second (~200ms warm) |
What is a Facilitator?
In the x402 protocol, a facilitator is a trusted intermediary that:
- Verifies payment authorizations are valid and well-formed
- Settles payments by submitting
transferWithAuthorization(EIP-3009) transactions on-chain - 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
| Method | Path | Description |
|---|---|---|
GET | /health | Health check |
GET | /supported | List supported networks and tokens |
POST | /verify | Verify a payment authorization |
POST | /settle | Settle (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
| Network | Chain ID | x402 Version | Token |
|---|---|---|---|
| Base Mainnet | eip155:8453 | v2 | USDC |
| Base Sepolia | eip155:84532 | v2 | USDC |
| Base Mainnet | base | v1 (legacy) | USDC |
| Base Sepolia | base-sepolia | v1 (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
| Feature | xpay | Coinbase CDP | x402.org |
|---|---|---|---|
| Protocol fees | 0% | 0% | 0% |
| Gas sponsored | Yes | No | No |
| Authentication | None (permissionless) | API Key + OAuth | None |
| Non-custodial | Yes | Yes | Yes |
| x402 v1 + v2 | Both | Both | v1 |
| Testnet | Base Sepolia | Yes | Yes |
| OFAC compliance | No | Yes | No |
| Platform integration | Smart Proxy + Paywall + Observability | CDP ecosystem | Standalone |
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
- x402 Ecosystem Directory — Official listing of all x402 facilitators
- xpay Facilitator Landing Page — Detailed comparison and integration guides
- Blog: xpay x402 Facilitator — Architecture deep-dive and announcement
- GitHub PR #1248 — Ecosystem listing with test results
Learn more about the x402 Protocol or explore the Paywall Service to monetize your APIs.