Preflight an x402 endpoint before paying
zero-payment-guard.worker.beacon.host/v1/x402-preflight
Preflight an x402 endpoint before paying: fetches its 402 unpaid, checks the asset is Circle-issued USDC for that network, price sanity, scheme, timeout, and payTo (contract or EOA, USDC balance on Base). Returns ok / caution / block.
GET
https://zero-payment-guard.worker.beacon.host/v1/x402-preflightUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://zero-payment-guard.worker.beacon.host/v1/x402-preflight?url=https%3A%2F%2Fapi.onesource.io%2Fapi%2Fchain%2Ferc20-balance&method=GET");
console.log(await res.json());Example input
{
"url": "https://api.onesource.io/api/chain/erc20-balance",
"method": "GET"
}