Docs

Docs

Getting started with 402xAgent, then one page per product.

402xAgent checks an x402 endpoint right before your agent pays: pay, skip or recheck.

Checks read target terms on Base and Solana; paying 402xAgent itself is USDC on Base only.

  • OpenAPI spec: every route, parameter and price
  • Rules: verdicts, reason codes and confidence (JSON: /rules.json)
  • llms.txt: plain-text overview for agents
  • Pricing: free and paid tiers
  • Receipts: public check receipts
  • Skips: endpoints that disagree with their listing
  • MCP: POST https://api.402xagent.com/mcp (JSON-RPC, tools listed by tools/list)
  • Client guard for @x402/fetch and @x402/axios: github.com/withgrokbot/x402-spotcheck

Try it: check an endpoint (free)

Paste an x402 endpoint URL and press Check. This runs the real free check (5 a day, then $0.02 per check over x402). No wallet, no curl; nothing is signed or paid.

Quick start

Free check, no signup: GET https://api.402xagent.com/v1/products/endpoint-spot-check?url=<endpoint>&mode=dry-run

Composing checks (stacking)

spotCheckFetch from x402-spotcheck wraps fetch. wrapFetchWithPayment from @x402/fetch is what pays. Put the check inside payment:

import { wrapFetchWithPayment } from "@x402/fetch";
import { spotCheckFetch } from "x402-spotcheck";

const pay = wrapFetchWithPayment(spotCheckFetch(fetch), client);

A payee guard such as inamGuardedFetch from inam-protocol/integrations/agentkit is a separate project. We do not run or vouch for it. If you use one, nest it inside spotCheckFetch so its check runs first and payment last. This is the live composition section (/docs#payee-guard):

import { wrapFetchWithPayment } from "@x402/fetch";
import { spotCheckFetch } from "x402-spotcheck";
import { inamGuardedFetch } from "@inamprotocol/agentkit"; // built from the repo above

const payeeChecked = inamGuardedFetch(fetch, { block: ["fail"] }); // 1. payee
const routeChecked = spotCheckFetch(payeeChecked);                  // 2. route and price
const pay = wrapFetchWithPayment(routeChecked, client);            // 3. pays last
  • On skip, the check stops the call before payment. The error type is defined by x402-spotcheck.
  • The payee guard's options, errors and any cache are its own. Read its docs. The block above is a nesting order, not a description of that project's behaviour.

Product docs

Moved sections

The sections of the old single page now live on the product pages. Old links keep working: each one lands here and points on (with JavaScript on, it forwards you).

Endpoint Report

Moved to Endpoint Report: /docs/endpoint-report

Verify a report

Moved to Endpoint Report: /docs/endpoint-report#endpoint-report-verify

Watchtower

Moved to Watchtower: /docs/watchtower

Payment Status

Moved to Payment Status: /docs/payment-status

Worked example (402rates-ping, Oct 16)

Moved to Payment Status: /docs/payment-status#payment-status-example

Facilitator Check

Moved to Facilitator Check: /docs/facilitator-check

Expiry check (opt-in)

Moved to 402xAgent Check: /docs/check#expiry-check

Hosted Mode

Moved to Hosted Mode: /docs/hosted

Receipt signatures

Moved to Receipt Verification: /docs/receipt-verification#receipt-signatures