What is a Facilitator?
The facilitator is an optional but recommended service that simplifies the process of verifying and settling payments between clients (buyers) and servers (sellers). The facilitator is a service that:- Verifies payment payloads submitted by clients
- Settles payments on the blockchain on behalf of servers
The facilitator does not hold funds or act as a custodian - it performs
verification and execution of onchain transactions based on signed payloads
provided by clients.
Facilitator Responsibilities
Verify Payments
Confirm that the client’s payment payload meets the server’s declared
payment requirements
Settle Payments
Submit validated payments to the blockchain and monitor for confirmation
Provide Responses
Return verification and settlement results to the server, allowing the
server to decide whether to fulfill the client’s request
Protocol Compliance
Ensure standardized verification and settlement flows across services
Why Use a Facilitator?
Using a facilitator provides several key benefits:Reduced Operational Complexity
Reduced Operational Complexity
Servers do not need to interact directly with blockchain nodes or implement
complex payment verification logic.
Protocol Consistency
Protocol Consistency
Standardized verification and settlement flows across services ensure reliable
payment processing.
Faster Integration
Faster Integration
Services can start accepting payments with minimal blockchain-specific
development required.
Real-time Validation
Real-time Validation
Accurate, real-time validation of transactions without maintaining
blockchain infrastructure.
While it is possible to implement verification and settlement locally, using a
facilitator accelerates adoption and ensures correct protocol behavior.
Interaction Flow
The following diagram shows how clients, servers, and facilitators interact in the x402 protocol:Step-by-Step Breakdown
- Client makes an HTTP request to a resource server
- Resource server responds with a
402 Payment Required
status and payment details - Client creates a payment payload based on the selected payment scheme
- Client sends the request with
X-PAYMENT
header containing the payment payload - Resource server verifies the payment via the facilitator’s
/verify
endpoint - Facilitator performs verification and returns a verification response
- If valid, the resource server fulfills the request
- Resource server settles payment via the facilitator’s
/settle
endpoint - Facilitator submits the payment to the blockchain
- Facilitator waits for blockchain confirmation
- Facilitator returns execution response to the server
- Resource server returns the requested resource with settlement details