x402_precheck
x402 pre-payment safety check: pay / caution / avoid. Before your agent pays an unknown x402 endpoint, check it ($0.005). Give an x402 URL and/or payTo; optional maxPrice to catch bait-and-switch. Live unpaid probe (GET then POST) parsing x402 v1 body AND v2 header; canonical USDC contract, network, price, timeout; payTo hijack / v1-v2 mismatch; payTo wallet on Base: ~75h of USDC inflows, distinct payers, self-funding concentration, fresh-wallet; Coinbase Bazaar + PayAI 30-day payers/calls with wallet-farming, keep-alive self-payment and listing-carpet detection; price vs median of comparable paid listings. Returns schema hearth.precheck.v2: verdict (pay/caution/avoid), allow, 0-100 score, confidence, coded reasons [{code,severity,detail}] and signals. Batch: /v1/x402/precheck-batch. Example output: {"schema":"hearth.precheck.v2","verdict":"pay","allow":true,"score":90,"confidence":"high","reasons":[],"signals":[{"code":"valid_402","severity":"info","detail":"valid x402 v2 challenge via POST"},{"code":"organic_catalog_usage","severity":"info","detail":"92 payers / 8960 calls in 30d"}],"priceUsd. Price: $0.005 USDC on Base via x402 (pass the payment in _meta["x402/payment"]).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | x402 resource URL to check | |
| deep | No | 1 = force a live ~75h on-chain scan instead of the index (slower) | |
| payTo | No | Expected payTo (0x…, Base); flags payTo hijack | |
| method | No | GET or POST (default: try GET then POST) | |
| maxPrice | No | Max USD you expect to pay; flags bait-and-switch pricing |