x402 preflight: inspect a paid endpoint before paying API

Sends an unpaid GET to an x402 endpoint and reports what it would charge before paying: HTTP status, redirects (max 3, re-validated), v2 PAYMENT-REQUIRED header or v1 body challenge and its validity, each accepts entry (scheme, CAIP-2 network/name, atomic amount, USD for canonical USDC, asset check, payTo, timeout, EIP-712 name/version), OFAC SDN payTo screen, resource, Bazaar extension, risk flags, host context from registry RDAP (registrar, domain age) and Cloudflare DoH.

$0.005 per call  USDC over x402 v2 on Base, Polygon, Arbitrum, Avalanche or Sei. No signup, no API key. Requests that fail or match nothing are not charged.

Endpoint

GET https://trust.kit-rx.com/v1/x402/preflight

Parameters

NameTypeRequiredDescription
urlstringyeshttps:// URL of the x402 endpoint, including any query string, up to 2048 characters. Default port only; no embedded credentials, IP-address hosts, localhost or private names. e.g. https://api.kit-rx.com/v1/x402/receipt

Example request

https://trust.kit-rx.com/v1/x402/preflight?url=https%3A%2F%2Fapi.kit-rx.com%2Fv1%2Fx402%2Freceipt

Without payment the server answers 402 Payment Required with the price (5000 atomic USDC) in the PAYMENT-REQUIRED header. Any x402 v2 client pays and retries automatically. A request with no parameters runs this example.

curl -i "https://trust.kit-rx.com/v1/x402/preflight?url=https%3A%2F%2Fapi.kit-rx.com%2Fv1%2Fx402%2Freceipt"

Pay from an agent

AgentCash: fetch the URL. OpenDexter MCP: x402_fetch. Kit Rx MCP server: https://trust.kit-rx.com/mcp. Code:

import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.BUYER_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
const res = await pay("https://trust.kit-rx.com/v1/x402/preflight?url=https%3A%2F%2Fapi.kit-rx.com%2Fv1%2Fx402%2Freceipt");
console.log(await res.json());

Example response

{
  "query": {
    "url": "https://api.kit-rx.com/v1/x402/receipt"
  },
  "result": {
    "requested_url": "https://api.kit-rx.com/v1/x402/receipt",
    "final_url": "https://api.kit-rx.com/v1/x402/receipt",
    "http": {
      "status": 402,
      "content_type": "application/json",
      "latency_ms": 329,
      "redirects": [],
      "redirect_stopped": null
    },
    "is_x402": true,
    "x402_version": 2,
    "challenge_source": "payment-required header",
    "challenge_valid": true,
    "challenge_problems": [],
    "server_error": "Payment required",
    "resource": {
      "url": "https://api.kit-rx.com/v1/x402/receipt",
      "description": "Decodes the x402 v2 PAYMENT-SIGNATURE header sent with the request into a readable receipt: …",
      "mimeType": "application/json"
    },
    "accepts_count": 5,
    "accepts": [
      {
        "index": 0,
        "scheme": "exact",
        "network": "eip155:8453",
        "network_caip2": "eip155:8453",
        "network_name": "Base",
        "testnet": false,
        "amount_atomic": "2000",
        "amount_usd": "0.002",
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "asset_is_canonical_usdc": true,
        "asset_note": null,
        "pay_to": "0xAf8E0A8a8A0A8f65831b2dD0FFe0c1B804698D70",
        "max_timeout_seconds": 300,
        "transfer_method": "eip3009",
        "eip712": {
          "name": "USD Coin",
          "version": "2",
          "present": true,
          "matches_usdc_contract": true
        },
        "extra_keys": [
          "name",
          "version"
        ],
        "problems": []
      },
      {
        "index": 1,
        "scheme": "exact",
        "network": "eip155:137",
        "network_caip2": "eip155:137",
        "network_name": "Polygon",
        "testnet": false,
        "amount_atomic": "2000",
        "amount_usd": "0.002",
        "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
        "asset_is_canonical_usdc": true,
        "asset_note": null,
        "pay_to": "0xAf8E0A8a8A0A8f65831b2dD0FFe0c1B804698D70",
        "max_timeout_seconds": 300,
        "transfer_method": "eip3009",
        "eip712": {
          "name": "USD Coin",
          "version": "2",
          "present": true,
          "matches_usdc_contract": true
        },
        "extra_keys": [
          "name",
          "version"
        ],
        "problems": []
      }
    ],
    "price_usd": {
      "min": "0.002",
      "max": "0.002"
    },
    "bazaar": {
      "present": true,
      "info_present": true,
      "schema_present": true,
      "input_type": "http",
      "method": "GET",
      "query_params": [
        "echo"
      ],
      "output_example_present": true
    },
    "extension_keys": [
      "bazaar"
    ],
    "risk_flags": [],
    "risk_summary": {
      "high": 0,
      "medium": 0,
      "low": 0
    },
    "ofac": {
      "source": "U.S. Treasury OFAC SDN List",
      "list_date": "2026-11-13",
      "checked": [
        "0xAf8E0A8a8A0A8f65831b2dD0FFe0c1B804698D70"
      ],
      "match": false,
      "matches": []
    },
    "host": {
      "host": "api.kit-rx.com",
      "registrable_domain": "kit-rx.com",
      "platform": null,
      "dns": {
        "a": [
          "104.21.58.22",
          "172.67.198.112"
        ],
        "aaaa": [
          "2606:4700:3035::6815:3a16",
          "2606:4700:3033::ac43:c670"
        ],
        "all_public": true
      },
      "registration": {
        "rdap": "found",
        "registrar": "Squarespace Domains II LLC",
        "registrar_iana_id": "895",
        "created": "2025-12-04T00:21:00.000Z",
        "age_days": 346
      }
    }
  },
  "sources": [
    {
      "name": "Unpaid GET of the endpoint (no payment header)",
      "url": "https://api.kit-rx.com/v1/x402/receipt"
    },
    {
      "name": "Cloudflare DNS over HTTPS (JSON API)",
      "url": "https://cloudflare-dns.com/dns-query"
    },
    {
      "name": "IANA RDAP bootstrap",
      "url": "https://data.iana.org/rdap/dns.json"
    },
    {
      "name": "Registry RDAP (rdap.verisign.com)",
      "url": "https://rdap.verisign.com/com/v1/domain/kit-rx.com"
    }
  ],
  "attribution": [
    "DNS resolved via Cloudflare 1.1.1.1 DNS-over-HTTPS.",
    "Registration data from the domain's registry via RDAP, subject to that registry's terms; provided for per-domain due diligence only, not for bulk collection or marketing."
  ],
  "generated_at": "2026-11-15T01:05:48.404Z"
}

Kit Rx Agent Trust: x402 Preflight, Finder & Sanctions: Trust tools for paying agents: check an x402 endpoint before paying, find trusted paid APIs, screen addresses and names against OFAC sanctions, decode payment receipts, paid per call over x402. Machine-readable: OpenAPI, llms.txt, /.well-known/x402, agent skills.