x402 precheck
x402_precheckCheck an x402 payment challenge BEFORE your agent pays (0.002 USDC per check via x402; free trial 1024 checks/IP/UTC day). Give an endpoint URL (fetched unpaid, never paid) or paste a 402 challenge. Validates x402 version, scheme, network (CAIP-2, testnet flag), canonical USDC asset, amount sanity, payTo format/EIP-55 checksum/zero address, EIP-712 domain, payment window, facilitator reachability and scheme/network support, optional maxPriceUsd / expectPayTo / expectNetwork policy, and PayAI Bazaar listing match. Returns per-check pass/warn/fail and a verdict: looks_ok, review or do_not_pay. Informational; invalid input and failed checks are not charged.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "x402_precheck"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | x402 endpoint URL to probe (public http/https). Fetched unpaid; never paid. | |
| method | No | HTTP method used to probe url | GET |
| challenge | No | Alternative to url: the 402 challenge itself (JSON body, or the base64 PAYMENT-REQUIRED header value). Takes precedence over url. | |
| expectPayTo | No | Policy: fail options whose payTo differs from this address | |
| facilitator | No | Facilitator base URL to test (https). Default: PayAI (mainnet) / x402.org (testnet). | |
| maxPriceUsd | No | Policy: fail options priced above this many USD (USDC) | |
| expectNetwork | No | Policy: fail options not on this network (CAIP-2, e.g. eip155:8453) | |
| compareDirectory | No | Compare live terms with the PayAI Bazaar listing (url mode) | true |