How x402 Works
x402 is a payment protocol that lets a user authorize token transfers for paid requests. The facilitator verifies the authorization and settles it on-chain.
Flow
- Authorization: The user signs an ERC-3009
TransferWithAuthorizationmessage. - Verification: The backend calls
/verifyto validate recipient, amount, time window, balance, and signature. - Settlement: The backend calls
/settleand the facilitator submits the on-chain transfer. - Access: The backend fulfills the request after settlement.
This implementation currently supports the exact payment scheme and handles v1 and v2 request formats.
Last updated on