Why facilitators exist
Without a facilitator, every merchant would need to:- Run blockchain nodes or connect to RPCs
- Verify cryptographic signatures for each payment scheme
- Submit transactions and monitor confirmations
- Handle gas fees and failed transactions
How they work
Facilitator API
Facilitators expose four endpoints:| Endpoint | Method | Purpose |
|---|---|---|
/accepts | POST | Returns enriched payment requirements (adds facilitator-specific fields) |
/verify | POST | Verifies a payment proof without settling |
/settle | POST | Verifies and settles a payment on-chain |
/supported | GET | Lists supported schemes, networks, and assets |
/accepts
The middleware calls /accepts with partial payment requirements (scheme, network, asset, amount, recipient, resource URL). The facilitator enriches them with blockchain-specific details needed for the client to construct a valid payment:
Solana enrichment:
- Fee payer address (the facilitator co-signs and pays transaction fees)
- Token decimals
- Recent blockhash
- EIP-712 domain parameters:
name,version,chainId,verifyingContract
/settle
When a client sends a valid payment header (X-PAYMENT or PAYMENT-SIGNATURE), the middleware forwards it to /settle along with the original payment requirements. The facilitator:
- Validates the payment payload structure
- Verifies cryptographic signatures
- Checks amounts, addresses, and nonces
- Submits the transaction on-chain:
- Solana: Co-signs the partially-signed transaction as fee payer and submits to Solana RPC
- EVM: Calls
transferWithAuthorizationon the token contract and pays gas
- Returns
{ success: true, transaction, network }
Legacy v1 implementations may return these fields as
txHash and networkId. Spec-compliant v1 and v2 both use transaction and network. See Protocol Versions for the full mapping./verify
Verifies a payment proof without settling it on-chain. Useful for pre-validation before committing to settlement:
{ isValid: true, payer: "..." } on success.
/supported
Returns the list of schemes, networks, and assets the facilitator supports. Use this to confirm compatibility:
Default facilitator
Corbits provides a free production-ready facilitator:| Chain | Networks |
|---|---|
| Solana | devnet, mainnet-beta |
| EVM | Base, Base Sepolia, SKALE Europa Testnet, Polygon PoS, Polygon Amoy, Monad, Monad Testnet |
/supported endpoint for the canonical list of supported schemes, networks, and assets:
Running your own
You can run a facilitator using@faremeter/facilitator. See the Facilitator guide for setup instructions.
In-process handlers
Facilitator handlers can also run in-process, embedded directly in the middleware. Instead of configuring afacilitatorURL, you pass FacilitatorHandler instances to the middleware via x402Handlers. The middleware calls them locally to resolve requirements, verify, and settle payments.
Both modes use the same FacilitatorHandler interface, so handlers written for one mode work in the other. See the Middleware Overview for configuration details.
Further reading
- Payment Schemes — What happens inside the facilitator for each chain.
- Middleware — How to configure the middleware to talk to a facilitator.