Facilitator
Production-ready x402 payment protocol facilitator — verifies payment signatures and settles transactions on-chain over HTTP 402.
The facilitator is a trusted third party that acts on behalf of resource servers. It does not hold funds — it only validates payment payloads and broadcasts settlement transactions to the blockchain.
Built on r402, the modular Rust SDK for x402. See Security before using in production.
Quick Start
# Install from crates.io
# Generate a commented config template
# Edit config.toml with your RPC URLs and signer keys, then start
Docker
# Using pre-built image
# Or build from source
API
| Method | Path | Description |
|---|---|---|
GET |
/supported |
List supported payment kinds (version / scheme / network) |
POST |
/verify |
Verify a payment payload against requirements |
POST |
/settle |
Settle an accepted payment on-chain |
GET |
/health |
Health check |
CLI
facilitator <COMMAND>
Commands:
init Generate a default TOML configuration file
serve Start the facilitator HTTP server
Options:
-h, --help Print help
-V, --version Print version
init
facilitator init [OPTIONS]
Options:
-o, --output <PATH> Output path [default: config.toml]
--force Overwrite existing file
serve
facilitator serve [OPTIONS]
Options:
-c, --config <PATH> Path to TOML config file [default: config.toml]
Configuration
The server loads configuration from a TOML file (default: config.toml). Run facilitator init to generate a fully commented template.
= "0.0.0.0"
= 8080
# Global signers — shared across all chains of the same type.
# Env-var references ("$VAR" or "${VAR}") are resolved at startup.
[]
= ["$EVM_SIGNER_PRIVATE_KEY"] # hex, 0x-prefixed
= "$SOLANA_SIGNER_PRIVATE_KEY" # base58, 64-byte keypair
# EVM chains (CAIP-2 key format: "eip155:<chain_id>")
[]
= [{ = "https://mainnet.base.org" }]
[]
= [{ = "https://sepolia.base.org" }]
# Solana chains
[]
= "https://api.mainnet-beta.solana.com"
# Scheme registrations (optional — auto-generated from configured chains)
# [[schemes]]
# id = "v2-eip155-exact"
# chains = "eip155:{8453,84532}"
Environment Variables
| Variable | Default | Description |
|---|---|---|
HOST |
0.0.0.0 |
Bind address |
PORT |
8080 |
Listen port |
CONFIG |
config.toml |
Config file path (for serve) |
OTEL_* |
— | OpenTelemetry configuration |
Supported Chains
| Family | Networks |
|---|---|
| EVM (EIP-155) | Ethereum, Base, Optimism, Arbitrum, Polygon, Avalanche, Celo, Monad, and testnets |
| Solana (SVM) | Mainnet, Devnet, and custom clusters |
Feature Flags
| Feature | Default | Description |
|---|---|---|
chain-eip155 |
✓ | EVM chain support via r402-evm |
chain-solana |
✓ | Solana chain support via r402-svm |
telemetry |
✓ | OpenTelemetry tracing and metrics |
Disable unused chains to reduce binary size and compile time:
Security
See SECURITY.md for disclaimers, supported versions, and vulnerability reporting.
Acknowledgments
- r402 — modular Rust SDK for the x402 payment protocol
- x402 Protocol Specification — protocol design by Coinbase
- coinbase/x402 — official reference implementations (TypeScript, Python, Go)
License
Licensed under the Functional Source License, Version 1.1, Apache-2.0 Future License (FSL-1.1-ALv2).
- You can use, modify, and redistribute for any purpose except competing use.
- Each version automatically converts to the Apache License, Version 2.0 two years after release.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project shall be licensed as above, without any additional terms or conditions.
A QNTX open-source project.
Code is law. We write both.