Paywary

Developers

Two ways to use Paywary from an agent: call the verdict API directly, or wrap your x402 client with the zero-dependency guard.

Verdict API

GET /v1/check?url=…[&method=…] or GET /v1/check?payTo=…. No API key. 60 requests per minute per IP. Answers are precomputed and never trigger a probe.

curl 'https://paywary.com/v1/check?url=https://api.seller.com/v1/data'

Returns verdict (pay, caution, avoid, unverified), score, confidence, two reasons, the latest quote (amount, asset, network, payTo), lastProbedAt, lastPaidProbeAt, and evidence links. A payTo query returns the worst verdict among endpoints paying to that wallet plus the list of matches. Unknown URLs return unverified with queued: true and are probed within the hour.

Full field reference: docs/api.md.

Wrapper

npm install paywary
import { wrapFetchWithPayment } from "@x402/fetch";
import { withPaywary } from "paywary";

const payingFetch = wrapFetchWithPayment(fetch, client);
const safeFetch = withPaywary(payingFetch, { caution: "ask", onAsk: (r) => r.score! >= 60 });
const res = await safeFetch("https://api.seller.com/v1/data");

Defaults: avoid blocks, caution and unverified allow. Each can be "allow", "block" or "ask" (your callback decides). failOpen (default true) controls what happens when Paywary is unreachable. Blocked calls throw SellerTrustBlockedError with the verdict, reasons and an evidence link, or return a 403 with blockMode: "response".

Set inspectChallenge: true (with a non-paying plainFetch) to read the seller's 402 first, check the quoted wallet with ?payTo=, and enforce maxAmountAtomic before any payment is signed.

Package source and README: packages/wrapper.

Self-hosting

Everything is open source: crawler, prober, scorer, this site and the API. See the README. Scores are deterministic from the probe data, so a self-hosted instance reproduces ours.

Scores measure reliability and honesty, not output quality. Methodology.