x402 security audit · X402 Audit

by x402 security audit

GETBaseSolanaArbitrumPolygonMonadAvalancheeip155:1329OptimismFraxtaleip155:42220stellar:pubnetalgorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=

$0.01

per call · USD Coin on Base

Grade any x402 seller's payment-security posture from the outside - a read-only black-box check mapped to the 'Five Attacks on x402' failure modes. Probes the URL's 402 challenge (never pays) and scores TLS transport, gated-response cache hygiene (Attack III / cache leakage), error/info-leak hygiene, and payment-terms well-formedness, then returns a letter grade with per-check findings and an honest note on what only insider/active testing can confirm.

Endpoint

GET https://agent402.tools/api/x402-audit

4

Calls / 30d

1

Unique payers / 30d

Aug 31

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://agent402.tools/api/x402-audit", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://agent402.tools/api/x402-audit?method=POST&url=https%3A%2F%2Fagent402.tools%2Fapi%2Fhash" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "checks": [
    {
      "attack": "credential interception",
      "detail": "https",
      "id": "transport-tls",
      "severity": "high",
      "status": "pass",
      "title": "Payment challenge served over TLS"
    },
    {
      "attack": "III - cache leakage",
      "detail": "Cache-Control: no-store, private",
      "id": "cache-hygiene",
      "severity": "high",
      "status": "pass",
      "title": "Gated response is not shared-cacheable"
    }
  ],
  "grade": "A",
  "paymentRequired": true,
  "reachable": true,
  "score": 92,
  "status": 402,
  "summary": "A (92/100) - 6 passed, 1 warning, 0 failed. Note: replay/idempotency (II) and router Sybil (IV) can't be graded from outside.",
  "url": "https://api.example.com/paid",
  "x402Version": 2
}

Payment details

Pay to0xabf4fabd7c416fb67202e5f9002389fc75e2a9d0
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Solana, Arbitrum, Polygon, Monad, Avalanche, eip155:1329, Optimism, Fraxtal, eip155:42220, stellar:pubnet, algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=
Schemesexact, upto

Is this your API?

Pin it to the top of Social & Community and the homepage with a featured placement.

Get featured →

More from x402 security audit & similar services