402 to unpaid requests, then verifies and settles a payment once the caller attaches one.
Define what you accept
facilitator.getSupported() (see Quickstart) to find valid blockchainId/assetId values for the network and token you want to accept.
Challenge, verify, settle
1
No X-PAYMENT header
Respond
402 with { x402Version: 1, accepts: [requirement] }. This is the machine-readable challenge the payer’s agent parses to know what, where, and how much to pay.2
X-PAYMENT header present
Base64-decode it into a
PaymentPayload and call facilitator.verify(payload, requirement). This checks the EIP-712 signature, amount, recipient, and validity window against your requirement — no funds move yet.3
Verified — settle it
Call
facilitator.settle(payload, requirement). Your organization’s WAAS wallet relays the TransferWithAuthorization on-chain and pays the gas; funds land at payTo.4
Serve the content
Once
settle() resolves, return the actual paid resource along with the txHash for the caller’s records.Next steps
Payer Guide
See the other side of this flow.
API Reference
Full
verify/settle/getSupported signatures and types.
