# 10x402 — identify blockers to indexing and payment

Use this when an x402 endpoint passes validate but is not indexed, an x402
service is not showing up in Bazaar, a payment fails with a signature error, or
an x402 v1 vs v2 migration has drifted. It finds response-level blockers; it
cannot guarantee a listing, demand or a successful settlement.

## Call it

Free, no payment:

```bash
curl -sS https://10x402.com/check
```

The paid examples below show the request shape. An unpaid call returns a 402
quote, not the report; an x402-capable client must pay and retry the request.
This repository includes a complete Base buyer using its pinned `x402-fetch`
client. It authorizes at most $0.10 USDC, handles
the 402 payment retry, and creates the output file only after a verified report
is served:

```bash
git clone https://github.com/algonormative/10x402.git
cd 10x402
npm ci
export BUYER_PRIVATE_KEY=0xYOUR_FUNDED_BASE_BUYER_PRIVATE_KEY
npm run buyer:lint -- --url https://your-endpoint.example.com/api/thing \
  --max-spend-usd 0.10 --out ./10x402-report.json --yes
```

Use a dedicated buyer wallet holding USDC on Base. Never paste a seed phrase.
The script refuses a different spending ceiling, refuses to overwrite an
existing report, and never asks you to construct a PAYMENT header.

Lint a live endpoint ($0.10):

```bash
curl -sS -X POST https://10x402.com/lint \
  -H 'content-type: application/json' \
  -d '{"url": "https://your-endpoint.example.com/api/thing"}'
```

Lint a response you already have ($0.04) — works on staging,
on localhost, and on an endpoint that is not deployed yet:

```bash
curl -sS -X POST https://10x402.com/lint/envelope \
  -H 'content-type: application/json' \
  -d '{"status": 402, "headers": {"payment-required": "<base64>"}, "body": "<the 402 body>"}'
```

## One question, one check

When there is exactly ONE thing you want to know, name the check and pay for one
answer: $0.015 on a live URL, $0.004 on a response you paste. This is the form to
put in a test or a CI step, where the same one property is asserted on every
commit.

```bash
curl -sS -X POST https://10x402.com/lint/one \
  -H 'content-type: application/json' \
  -d '{"url": "https://your-endpoint.example.com/api/thing", "check": "V2_B64_URLSAFE"}'

curl -sS -X POST https://10x402.com/lint/envelope/one \
  -H 'content-type: application/json' \
  -d '{"status": 402, "headers": {"payment-required": "<base64>"}, "check": "V2_B64_URLSAFE"}'
```

A full 94-check report costs 6.667x one check on a live URL and 10x on a pasted response — a 14.1x and 9.4x per-check advantage. Singles stay the cheaper buy through 6 questions live and 9 pasted; past that, buy the report. Do that
arithmetic before firing off a stack of single checks: past the counts above the
full report is cheaper AND tells you what you did not think to ask.

## When the problem is the RATING, not the endpoint

The lint answers "is my 402 right". The monitoring wing answers "what are the
rating surfaces saying about me, and is it true". Three free instruments read
this market and they disagree about who is alive — and the prime rater probes
GET-only, so a POST-declared seller reads uptime 0.0 and is rated D while
answering 402 perfectly well on the verb it published.

Free, no payment — the day's counts, and one host's snapshot:

```bash
curl -sS https://10x402.com/monitor
curl -sS https://10x402.com/monitor/your-host.example
```

Paid, per host: `POST /monitor/verdict` ($0.005) is the latest stored day —
three instruments side by side, the declared-verb and GET probe, the flags,
`as_of`-stamped and marked stale past 36 hours. `POST /monitor/history`
($0.03) is every day held. `POST /monitor/receipt` ($0.12) is the dispute pack:
the series, the contradiction stated in numbers, a SHA-256 digest over the
canonical JSON, and an attestation naming the probe method, the User-Agent every
request carried, and that no payment was ever sent.

```bash
curl -sS -X POST https://10x402.com/monitor/verdict \
  -H 'content-type: application/json' \
  -d '{"host": "your-host.example"}'
```

**NULL AND 0 ARE DIFFERENT CLAIMS** in every one of these answers. A null
instrument column means that instrument had no row for that host that day; a
probe status of 0 means it was asked and gave no HTTP answer at all; a null
`wrongly_dead` means the day's probe has not run yet — never that nobody was
found. Nothing is fetched to serve them: they re-serve what the crons stored,
which is what makes the `as_of` stamp true.

**READ `applied` BEFORE `passed`.** A single-check answer has THREE outcomes,
and the third is the one that will mislead a reader who skims:

```json
{
  "check": "V2_HEADER_PRESENT",
  "applied": true,
  "passed": false,
  "finding": {
    "severity": "error",
    "code": "V2_HEADER_PRESENT",
    "message": "no PAYMENT-REQUIRED response header — this endpoint publishes no x402 v2 envelope.",
    "fix": "Add a PAYMENT-REQUIRED response header to the 402 carrying the standard-base64 JSON v2 envelope. This costs you DISCOVERY rather than payment, and the distinction is worth being precise about: @x402/core reads the header first but DOES fall back to a v1 body when there is none, so the current client generation can still pay you. What it cannot do is find you — CDP marks the PAYMENT-REQUIRED header a required indexing check, so a v1-only 402 is not catalogued at all, and a strictly-v2 client cannot pay it either. Keep the v1 body exactly as it is; the two versions share a 402 without either noticing the other.",
    "core": false,
    "sources": [
      {
        "kind": "spec",
        "ref": "specs/transports-v2/http.md:7-25 § Payment Required Signaling"
      },
      {
        "kind": "cdp-validator",
        "ref": "cdp-validator-toolshed.json preflight[6] payment_required_header (required)"
      },
      {
        "kind": "client-code",
        "ref": "@x402/core@2.23.0 dist/cjs/http/index.js:1620-1628 — the v2 client DOES fall back to a v1 body"
      },
      {
        "kind": "field-report",
        "ref": "x402-foundation/x402#3091 — x402-fetch@1.x is still a live buyer population"
      }
    ]
  },
  "regime": "bazaar",
  "severity": "error",
  "core": false,
  "sources": [
    {
      "kind": "spec",
      "ref": "specs/transports-v2/http.md:7-25 § Payment Required Signaling"
    },
    {
      "kind": "cdp-validator",
      "ref": "cdp-validator-toolshed.json preflight[6] payment_required_header (required)"
    },
    {
      "kind": "client-code",
      "ref": "@x402/core@2.23.0 dist/cjs/http/index.js:1620-1628 — the v2 client DOES fall back to a v1 body"
    },
    {
      "kind": "field-report",
      "ref": "x402-foundation/x402#3091 — x402-fetch@1.x is still a live buyer population"
    }
  ],
  "summary": {
    "versions_detected": [
      1
    ],
    "payTo": "0x0000000000000000000000000000000000000001",
    "network": "base",
    "price": "$0.001 (1000 atomic)"
  },
  "checks_run": 1
}
```

`passed: null` with `applied: false` means the check DID NOT RUN against this
response — a v2 check against a v1-only endpoint asserted nothing at all. Never
summarise that as a pass. `note` says what did not happen and why. The check
ids come from `GET /check`; an unknown one is a 400 that lints nothing and
charges nothing.

## A 402 is the price, not an error

The first unauthenticated call answers HTTP 402 carrying an x402 envelope in
both protocol versions. Do not report it as a failure and do not retry it
unpaid. Retry it through an x402-capable HTTP client holding a wallet with USDC
on Base or Solana; the client reads the envelope, signs, and retries with a
payment header. There is no login and no API key. Read the accepts array for the
rails actually on offer rather than assuming a chain; Base is always first.

NEVER ask a person to paste a private key or a seed phrase.

## Trust boundaries

The test suite lints the 402 that the Worker actually serves. Every build also
self-lints all 8 paid endpoint envelopes and fails on any finding.

The application store keeps no linted URLs, pasted envelopes or reports. What
you lint is your business.

## Read the report

```json
{
  "grade": "A",
  "summary": {
    "versions_detected": [
      1
    ],
    "payTo": "0x0000000000000000000000000000000000000001",
    "network": "base",
    "price": "$0.001 (1000 atomic)",
    "bazaar_ready": "n/a",
    "blockers": [
      "V2_HEADER_PRESENT"
    ]
  },
  "findings": [
    {
      "severity": "error",
      "code": "V2_HEADER_PRESENT",
      "message": "no PAYMENT-REQUIRED response header — this endpoint publishes no x402 v2 envelope.",
      "fix": "Add a PAYMENT-REQUIRED response header to the 402 carrying the standard-base64 JSON v2 envelope. This costs you DISCOVERY rather than payment, and the distinction is worth being precise about: @x402/core reads the header first but DOES fall back to a v1 body when there is none, so the current client generation can still pay you. What it cannot do is find you — CDP marks the PAYMENT-REQUIRED header a required indexing check, so a v1-only 402 is not catalogued at all, and a strictly-v2 client cannot pay it either. Keep the v1 body exactly as it is; the two versions share a 402 without either noticing the other.",
      "core": false,
      "sources": [
        {
          "kind": "spec",
          "ref": "specs/transports-v2/http.md:7-25 § Payment Required Signaling"
        },
        {
          "kind": "cdp-validator",
          "ref": "cdp-validator-toolshed.json preflight[6] payment_required_header (required)"
        },
        {
          "kind": "client-code",
          "ref": "@x402/core@2.23.0 dist/cjs/http/index.js:1620-1628 — the v2 client DOES fall back to a v1 body"
        },
        {
          "kind": "field-report",
          "ref": "x402-foundation/x402#3091 — x402-fetch@1.x is still a live buyer population"
        }
      ]
    },
    {
      "severity": "info",
      "code": "BILLING_TERMS_DISCLOSED",
      "message": "no machine-readable billing-terms object was found. Consulted: the 402 (accepts[].extra.billing_terms); /.well-known/x402 resources[].billing_terms (not supplied); OpenAPI x-billing-terms (not supplied). Prose in `description` was not parsed.",
      "fix": "Publish a billing-terms object with all four keys, in any ONE of: `accepts[].extra.billing_terms` in the 402 (always read), `resources[].billing_terms` in /.well-known/x402, or `x-billing-terms` on the OpenAPI operation (both read only when the caller supplies them). e.g. {\"billable_unit\":\"1 second\",\"hold\":\"the quote, released in 24h\",\"acceptance_observer\":\"the buyer\",\"silence_window\":\"72h\"}. Any JSON value counts; prose in `description` is not parsed. algonormative/10x402#10's block gives billable_unit and hold only: add acceptance_observer and silence_window. NOTHING REQUIRES THIS (no spec, client or registry): informational, moves neither verdict.",
      "core": false,
      "sources": [
        {
          "kind": "field-report",
          "ref": "Moltbook 92cd240a… (bitroadai), \"transport success is not billable completion\" — buyers asked for the minimum billable unit and what a hold covers"
        },
        {
          "kind": "field-report",
          "ref": "Moltbook 6868a451… / 2d2df453… (relayzero, @miacollective) — who observes acceptance, and how long silence counts as acceptance, as terms a buyer needs before paying"
        },
        {
          "kind": "house-opinion",
          "ref": "no spec requires these four, no client parses them, no registry demands them — this check can only REPORT. Key names from house PR algonormative/10x402#10"
        },
        {
          "kind": "spec",
          "ref": "specs/x402-specification-v2.md § 6.1 (Payment Flow Models), read 2026-09-09 — SILENT on all four",
          "context": true
        }
      ]
    }
  ],
  "checks_run": 29
}
```

Each finding carries a `fix` written to be applied directly. Work through
`error` findings first — those are what a client, a facilitator or the index
will reject — then `warn`, which are the things that quietly cost the seller
discovery or a class of buyer. `info` never affects the grade.

`checks_run` is how many checks APPLIED. A v1-only endpoint skips every v2
check, so a rising `checks_run` between two reports means more of the surface
is now testable, not that the endpoint got worse.

## Two verdicts, not one

**`grade` answers "can this endpoint be paid".** It counts payment-regime
findings only: the specifications' MUSTs, and what a shipping client parses,
throws on, or refuses to sign.

**`summary.bazaar_ready` answers "can this endpoint be found".** `true`,
`false`, or `"n/a"` for a v1-only endpoint, computed from bazaar-regime
errors, with the blocking codes in `summary.blockers`.

DO NOT REPORT A GRADE WITHOUT THE SECOND VERDICT. **Grade A with
`bazaar_ready: false`** is the commonest interesting result: the endpoint takes
payments correctly and CDP will not catalogue it. That is exactly the situation
someone means by "it passes validate but is not indexed", and answering it with
a single letter either overstates a working endpoint's problems or hides a real
one.

Each check names its `regime` and its `sources` in `GET /check`. When you
quote a rule to someone, quote its source with it — `house-opinion` is one of
the kinds, and a rule labelled that way is a judgement call rather than a
citation.

## Grades

- **A** — zero payment-regime errors and zero payment-regime warnings
- **B** — zero payment-regime errors, one or two warnings
- **C** — zero payment-regime errors, three or more warnings
- **D** — one or more payment-regime errors, none of them core
- **F** — any core error — the envelope is not usable as published

Every grade above is computed from 49 payment-regime checks.
The 25 bazaar-regime checks set `bazaar_ready`; the
19 hygiene checks are info and never grade; and the
1 informational check reports a disclosure buyers asked for that
no specification requires, moving neither verdict.

## What it will not tell you

It checks the published HTTP 402 and its envelopes; it does not attempt a real
payment to the seller, query Bazaar's index or measure demand. It follows no
redirects. The URL guard does not pre-resolve DNS, so it cannot defend against
DNS rebinding. It refuses private and reserved addresses — use
`/lint/envelope` for anything not publicly reachable.

## Related

[Parallax](https://parallax402.com) — the x402 economy, measured: buyer side and seller side of every settlement. Ask Parallax who paid whom; ask 10x402 whether an endpoint can be paid at all.

Contact: support@10x402.com
