Public x402 facilitator for Base, Solana, and ICP
The facilitator is an off-chain service that verifies x402 payment proofs on behalf of resource servers. When a client attaches a signed payment to an HTTP request, the resource server does not query the blockchain directly: it forwards the payment to the facilitator, which verifies it and then settles it on chain.
Public endpoint: https://facilitator.canister.software
Why a Facilitator?
Section titled “Why a Facilitator?”On-chain verification from inside a request handler is impractical — it would block the server on RPC latency for every paid request, require the server to maintain full blockchain state or RPC credentials per network, and make multi-network support expensive to operate.
The facilitator solves this by acting as a verification and settlement service. The resource server speaks a single REST protocol to one endpoint regardless of which network the client paid on. The facilitator resolves the chain-specific logic, checks the payment, and then settles it on chain.
Resource Server Facilitator Chain │ │ │ ├── POST /verify ───────────►│ │ │ { paymentPayload, │ │ │ paymentRequirements } │ │ │◄── { isValid: true } ──────┤ │ │ │ │ ├── POST /settle ───────────►├── submit transfer ──────►│ │◄── { success, transaction }┤◄── confirmed ────────────┤Verification Flow
Section titled “Verification Flow”- Client sends a request with a signed payment in the
PAYMENT-SIGNATUREheader (X-PAYMENTfor x402 v1 clients) - Resource server pairs the payment with what the route expects: network, amount, and
payTo - Resource server calls the facilitator’s
POST /verify, which returns{ isValid, invalidReason? } - If the payment is valid, the resource server calls
POST /settle, and the facilitator submits the transfer on the payment’s network - Settlement returns
{ success, transaction, network }, orsuccess: falsewith anerrorReason - Resource server serves the response, or returns
402again
paymentMiddleware from @x402/express makes these calls for you. Each call is independent; the resource server does not hold a session with the facilitator.
Endpoints
Section titled “Endpoints”| Route | Purpose |
|---|---|
POST /verify | Check a payment against its requirements, without moving funds |
POST /settle | Settle a verified payment on chain |
GET /supported | The scheme and network pairs this facilitator handles |
GET /info | Facilitator identity, including its ICP principal and enabled networks |
GET /discovery/resources | A catalog of resources that accept x402 payment through this facilitator |
GET /health | Liveness check |
Connecting a Resource Server
Section titled “Connecting a Resource Server”import { HTTPFacilitatorClient } from '@x402/core/server'
const facilitatorClient = new HTTPFacilitatorClient({ url: process.env.FACILITATOR_URL ?? 'https://facilitator.canister.software'})Pass this client to x402ResourceServer. All verification calls from paymentMiddleware are routed through it automatically.
Reference
Section titled “Reference”| Property | Value |
|---|---|
| Public URL | https://facilitator.canister.software |
| Client class | HTTPFacilitatorClient from @x402/core/server |
| Protocol | REST: the resource server posts each payment to /verify, then /settle |
| State | Each call is independent. The facilitator keeps a small database of used payment nonces, so a payment cannot be replayed, and of its discovery catalog |
| Multi-network | Yes — the facilitator handles all supported networks behind one endpoint |
See Supported Networks for the full list of chains and tokens the facilitator accepts.