{
  "lang": "en",
  "page": "https://x402-catalog-history.ai-business-surface.workers.dev/en/check-before-paying",
  "title": "x402 check before paying: is this x402 endpoint alive, and what does it charge? (measured)",
  "h1": "Check an x402 endpoint before you pay: read the 402 declaration with one unpaid GET (measured)",
  "description": "How to check an x402 endpoint before paying. One unpaid GET returns a 402 whose body declares the network, the price and the payTo address; the free surfaces show delivery history and the shape of what you get. Values measured on public URLs are in one table.",
  "search_query": "x402 check before paying",
  "question": "Is this x402 endpoint alive, what will it charge, and can I check before paying?",
  "measured_at": "2026-10-17 JST",
  "measured": {
    "caption": "Checking an x402 endpoint before paying (unpaid GET, 2026-10-17 JST, public URLs)",
    "columns": [
      "route",
      "unpaid GET response",
      "declared price (USDC)",
      "declaration size",
      "response time"
    ],
    "rows": [
      [
        "/check",
        "402",
        "0.05",
        "21,252 B",
        "529 ms"
      ],
      [
        "/price",
        "402",
        "0.02",
        "21,644 B",
        "534 ms"
      ],
      [
        "/contract",
        "402",
        "0.02",
        "19,764 B",
        "188 ms"
      ],
      [
        "/markdown",
        "402",
        "0.01",
        "12,521 B",
        "206 ms"
      ],
      [
        "/digest",
        "402",
        "0.01",
        "10,260 B",
        "177 ms"
      ]
    ],
    "note": "All five routes returned a payment-required header, and accepts[0] in the body declared 10 fields: scheme / network / maxAmountRequired / resource / description / mimeType / payTo / maxTimeoutSeconds / asset / extra. The amount is in USDC atomic units (6 decimals), so 50000 is 0.05 USDC."
  },
  "headings": [
    "Conclusion",
    "Measured",
    "How to check",
    "Next step"
  ],
  "sections": [
    {
      "heading": "Conclusion",
      "html": "<p>You can check an x402 endpoint <strong>with one GET, before you pay anything</strong>. The 402 it returns declares the network (base), the amount (<code>maxAmountRequired</code>), the recipient (<code>payTo</code>) and what it will return. If it does not return a 402, it is not an x402 endpoint. Delivery history and the shape of the output are on the free surfaces.</p>"
    },
    {
      "heading": "Measured",
      "html": "<table>\n<thead><tr><th>route</th><th>unpaid GET response</th><th>declared price (USDC)</th><th>declaration size</th><th>response time</th></tr></thead>\n<tbody>\n<tr><td><code>/check</code></td><td>402</td><td>0.05</td><td>21,252 B</td><td>529 ms</td></tr>\n<tr><td><code>/price</code></td><td>402</td><td>0.02</td><td>21,644 B</td><td>534 ms</td></tr>\n<tr><td><code>/contract</code></td><td>402</td><td>0.02</td><td>19,764 B</td><td>188 ms</td></tr>\n<tr><td><code>/markdown</code></td><td>402</td><td>0.01</td><td>12,521 B</td><td>206 ms</td></tr>\n<tr><td><code>/digest</code></td><td>402</td><td>0.01</td><td>10,260 B</td><td>177 ms</td></tr>\n</tbody>\n</table>\n<p>All five routes returned a <code>payment-required</code> header, and <code>accepts[0]</code> in the body declared 10 fields: <code>scheme / network / maxAmountRequired / resource / description / mimeType / payTo / maxTimeoutSeconds / asset / extra</code>. The amount is in USDC atomic units (6 decimals), so <code>50000</code> is 0.05 USDC. The free surfaces were measured at the same time: <code>/status</code> 200 · 12,373 B · 719 ms, <code>/contract/sample</code> 200 · 1,860 B · 191 ms, <code>/guide/sample</code> 200 · 11,595 B · 161 ms, <code>/data</code> 200 · 5,874 B · 168 ms, <code>/health</code> 200 · 1,934 B · 170 ms.</p>"
    },
    {
      "heading": "How to check",
      "html": "<ol>\n<li><strong>GET it without paying</strong>. For example <code>curl -i -H 'Accept: application/json' 'https://x402-catalog-history.ai-business-surface.workers.dev/check?url=&lt;URL you want to check&gt;'</code>. A 402 plus a <code>payment-required</code> header means it is an x402 endpoint.</li>\n<li><strong>Read the amount and the recipient</strong>. In the body, <code>accepts[0].maxAmountRequired</code> divided by 6 decimals is the price, <code>payTo</code> is where the money goes, <code>network</code> is the settlement network and <code>asset</code> is the currency. Check all three against what you expect.</li>\n<li><strong>Look at delivery history and the shape of the output (free)</strong>. <code>/status</code> (per-route delivery record), <code>/contract/sample?url=&lt;URL&gt;</code> (a free sample of the shape of the response) and <code>/data</code> (the measured market price distribution). No payment has happened at any point here.</li>\n</ol>"
    },
    {
      "heading": "Next step",
      "html": "<p>If the endpoint is someone else's URL, one call to <a href=\"https://x402-catalog-history.ai-business-surface.workers.dev/check?url=https%3A%2F%2Fexample.com%2Fx\"><code>/check</code></a> (0.05 USDC) runs the whole check — liveness, price, payTo and the diff since last time. If you only want to watch your own endpoint daily, call the free <a href=\"https://x402-catalog-history.ai-business-surface.workers.dev/status\"><code>/status</code></a>.</p>"
    }
  ],
  "article_list": "https://x402-catalog-history.ai-business-surface.workers.dev/en"
}
