API
HTTP endpoints implemented by monorepo/facilitator/index.ts
All endpoints are implemented in monorepo/facilitator/index.ts.
POST /verify
/verifyVerifies an x402 payment payload against payment requirements.
x402 v1: routes to
@x402/legacyverifyx402 v2: routes to
@x402/corefacilitatorverify
Request body:
{
"paymentPayload": { "x402Version": 1 },
"paymentRequirements": {}
}Notes:
The handler expects
paymentPayload.x402Versionto be1or2.For v1,
paymentRequirements.networkmust be a supported string like"base-sepolia"/"base".For v2, networks are CAIP-2 style like
"eip155:84532".
POST /settle
/settleSettles an x402 payment on-chain.
x402 v1: routes to
@x402/legacysettlex402 v2: routes to
@x402/corefacilitatorsettle(with lifecycle hooks)
Request body:
Notes:
For v2, settlement can be aborted by hooks; the route returns a
success:falseresponse instead of a 500 when the abort is intentional.
POST /register
/registerRegisters an agent in ERC-8004 using an EIP-7702 authorization list and a delegation contract.
Request body (v1-style client):
Notes:
authorization.addressmust matchDELEGATE_CONTRACT_ADDRESS(the facilitator validates this).authorization.chainId/authorization.nonceare serialized to strings in the example clients and deserialized back intoBigIntserver-side.
GET /supported
/supportedReturns supported kinds + extensions.
Response shape matches @x402/core SupportedResponse:
kinds: a map keyed by x402 version ("1","2", …) → array of{ scheme, network }This facilitator also injects v1 compatibility kinds for
"base-sepolia"and"base"under"1".
extensions: facilitator-implemented extensions (currently includesdiscoveryandfeedback)signers: CAIP family pattern → signer address list (for v2)
GET /health
/healthSimple health endpoint; includes metadata like network and version.
POST /discover
/discoverTriggers an on-demand discovery crawl (stores PaymentRequired responses in a local catalog).
Request body:
Notes:
seedUrlsis required (array of URL strings).Bounds are clamped server-side.
GET /catalog
/catalogReturns the current discovery catalog snapshot.
Query params:
full=1: returns full storedPaymentRequiredpayloads; otherwise returns a summary view.
POST /close
/closeGracefully exits the process after responding. Intended for controlled environments only.
Last updated