{"openapi":"3.1.0","info":{"title":"facilitator.x402cloud.ai","version":"0.1.0","description":"x402 protocol facilitator — verify and settle USDC micropayments on-chain. Verifies Permit2-signed USDC payments and settles them on-chain so x402 middleware can handle payment verification without servers needing private keys. Supports both exact (fixed-price) and upto (metered) payment schemes. Self-host: also available as a Docker image — `docker run -e FACILITATOR_PRIVATE_KEY=0x... -e RPC_URL=https://mainnet.base.org -e NETWORK=eip155:8453 -p 3000:3000 ghcr.io/x402cloud/facilitator`. Integration: servers use @x402cloud/middleware with a facilitator URL (`remoteExactPaymentMiddleware(routes, \"https://facilitator.x402cloud.ai\")`); the middleware calls /verify-exact on each request and /settle-exact after successful responses (the /verify + /settle pair for the upto scheme). Request/response JSON Schemas for every endpoint are in GET /openapi.json. Source: https://github.com/x402cloud/x402cloud","contact":{"url":"https://x402cloud.ai"}},"servers":[{"url":"https://facilitator.x402cloud.ai","description":"Production"}],"paths":{"/supported":{"get":{"operationId":"getSupported","summary":"Supported schemes, networks, and facilitator address. No auth required.","tags":["facilitator"],"responses":{"200":{"description":"Supported schemes, networks, and facilitator address. No auth required.","content":{"application/json":{"schema":{"type":"object","properties":{"schemes":{"type":"array","items":{"type":"string"}},"networks":{"type":"array","items":{"type":"string"}},"facilitator":{"type":"string"}}}}}}}}},"/verify":{"post":{"operationId":"verifyUpto","summary":"Verify an upto (metered) payment payload against requirements. Requires bearer auth.","tags":["facilitator","upto"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payload","requirements"],"properties":{"payload":{"type":"object","description":"Signed Permit2 upto payment payload"},"requirements":{"type":"object","description":"Payment requirements to verify against"}}}}}},"responses":{"200":{"description":"Verify an upto (metered) payment payload against requirements. Requires bearer auth.","content":{"application/json":{"schema":{"type":"object","properties":{"isValid":{"type":"boolean"},"invalidReason":{"type":"string"}}}}}},"401":{"description":"Missing or invalid bearer token"}}}},"/settle":{"post":{"operationId":"settleUpto","summary":"Settle an upto payment on-chain for the metered amount. Requires bearer auth.","tags":["facilitator","upto"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payload","settlementAmount"],"properties":{"payload":{"type":"object","description":"Signed Permit2 upto payment payload"},"requirements":{"type":"object","description":"Payment requirements the payload was verified against"},"settlementAmount":{"type":"string","description":"Actual metered usage cost, <= the authorized amount"}}}}}},"responses":{"200":{"description":"Settle an upto payment on-chain for the metered amount. Requires bearer auth.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"txHash":{"type":"string"},"errorReason":{"type":"string"}}}}}},"401":{"description":"Missing or invalid bearer token"}}}},"/verify-exact":{"post":{"operationId":"verifyExact","summary":"Verify an exact (fixed-price) payment payload against requirements. Requires bearer auth.","tags":["facilitator","exact"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payload","requirements"],"properties":{"payload":{"type":"object","description":"Signed Permit2 exact payment payload"},"requirements":{"type":"object","description":"Payment requirements to verify against"}}}}}},"responses":{"200":{"description":"Verify an exact (fixed-price) payment payload against requirements. Requires bearer auth.","content":{"application/json":{"schema":{"type":"object","properties":{"isValid":{"type":"boolean"},"invalidReason":{"type":"string"}}}}}},"401":{"description":"Missing or invalid bearer token"}}}},"/settle-exact":{"post":{"operationId":"settleExact","summary":"Settle an exact payment on-chain for the full authorized amount. Requires bearer auth.","tags":["facilitator","exact"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payload","requirements"],"properties":{"payload":{"type":"object","description":"Signed Permit2 exact payment payload"},"requirements":{"type":"object","description":"Payment requirements the payload was verified against"}}}}}},"responses":{"200":{"description":"Settle an exact payment on-chain for the full authorized amount. Requires bearer auth.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"txHash":{"type":"string"},"errorReason":{"type":"string"}}}}}},"401":{"description":"Missing or invalid bearer token"}}}}}}