x402-facilitator
x402 Facilitator (@fastxyz/x402-facilitator) — verifies and settles x402 payments for supported Fast and EVM flows.
GitHub: fastxyz/fast-sdk
What You Can Do
The x402 Facilitator is the trust anchor of the x402 protocol. It runs as a service (or is called as an API) and does two critical jobs:
Verifies payment payloads — confirms that a payment presented by a client matches the server's expected network, recipient, asset, and amount
Settles payments — finalizes supported payment flows after successful verification
Use the facilitator when building:
x402 server integrations — every server needs to verify incoming payment proofs via a facilitator
Shared payment infrastructure — one facilitator service can back multiple x402-protected services
Custom verification logic — if your server needs direct control over verification and settlement
Installation
Install from npm as @fastxyz/x402-facilitator. For the exact install command, route surface, and deployment examples, use the package README on GitHub.
Architecture
The facilitator sits between an x402-enabled server and the underlying payment network. It exposes verification and settlement endpoints so application servers can stay focused on delivering the protected resource.
Client Server Facilitator Fast Network
│ │ │ │
│ pay (signs tx) │ │ │
│────────────────────►│ │ │
│ │ │ submit / sync │
│ │────────────────────►│────────────────────►│
│ │ │ │
│ │ 200 OK + resource │ │
│◄────────────────────│ │ │
│ │ verifyProof() │ │
│ │────────────────────►│ │
│ │ │ check settled txs │
│ │ │◄────────────────────│
│ │ { valid: true } │ │
│ │◄────────────────────│ │Verification endpoint
Checks whether the presented x402 payment is valid for the requested resource
Settlement endpoint
Finalizes supported payment flows after successful verification
Network adapters
Connect Fast and supported EVM payment flows to the common x402 service interface
Verification Flow
When a server receives a request with X-PAYMENT, it calls the facilitator:
Parse — Decode the payment payload from the request header
Validate — Check that network, recipient, asset, and amount match the server's requirement
Verify — Confirm the payload is valid for the relevant Fast or EVM payment flow
Settle — Finalize the payment when the integration requires settlement
Respond — Return a structured verification or settlement result to the calling service
Running the Facilitator Service
The facilitator can run as a standalone HTTP service that your servers call, or it can be mounted inside an existing application. The current package surface and deployment patterns are documented in the x402-facilitator README on GitHub.
Facilitator API
The current package exposes verification and settlement endpoints, including POST /verify, POST /settle, and GET /supported. Exact request and response schemas are maintained in the x402-facilitator README on GitHub.
Security Properties
The facilitator provides the following high-level guarantees:
Correct recipient
Payment must match the recipient configured by the server
Correct amount
Payment must satisfy the configured price requirement
Correct asset/network
Payment must match the configured asset and payment network
Structured verification
Servers receive a protocol-level verification result instead of implementing network checks themselves
Relationship to x402 Server
The x402 Server SDK (x402-server) ships with built-in facilitator integration — you typically don't call the facilitator directly when using x402-server. You do use the facilitator directly when:
Building a custom payment verification endpoint
Running the facilitator as a standalone service for multiple x402 servers
For complete API documentation, supported routes, configuration, and deployment examples, see the x402-facilitator README on GitHub.
Last updated
Was this helpful?