34 個線上 x402 付費端點中,20 個未讓瀏覽器讀取付款標頭:2026 年 11 月狀況
20 of 34 live x402 paywalls hide their payment header from browsers: State of Live x402 Endpoints (November 2026)
針對 39 個公開 x402 服務的檢查發現,36 個在已公佈的付費路由回傳 HTTP 402,但只有 7 個通過所有檢查。34 個回傳付款標頭的服務中,20 個未能讓瀏覽器跨來源讀取標頭;另有 11 個 402 回應沒有 accepts[] 挑戰資料。
A paid route answering HTTP 402 is only the start. A client still has to find the route, read the challenge, and pay the right amount on the right network. So we checked how many live x402 services get the whole path right.
We ran read-only checks against 39 distinct public x402 services. 36 of them (92.3%) returned a live HTTP 402 on a published paid route. Only 7 of those 36 (19.4%) passed every check below.
Methodology
Sample. We took 34 services at random (fixed seed) from the builder-submitted listings of a large public x402 directory. Starting from 1,225 listings, we kept only those marked online and payment-ready and deduplicated them by registrable domain. One pick turned out to be a self-described test server built to misbehave on purpose, so we left it out of every figure. We added 6 services we had already seen promoted in public posts. Each root domain counts once, so a provider with 50 routes is still one service. That gives N = 39.
When. We sent all paid-route requests on 24 November 2026 between 00:19 and 00:20 (Athens time, UTC+2), and the documentation checks followed a few minutes later.
What we requested, per service:
GET /.well-known/x402GET /llms.txt-
GET /openapi.json(andGET /.well-known/agent.jsonwhen no OpenAPI file was served) - Exactly one unpaid request to one published paid route, using the method the service documents. We sent an
Originheader so CORS middleware would answer as it would for a browser.
There was no authentication, no payment, no fuzzing and no writes, and we requested each path once. Every request had a 10 second timeout and an identifying User-Agent. We re-fetched the documentation files once after fixing a parser bug on our side. We never sent a second request to any paid route.
How we classified results. A script decoded each PAYMENT-REQUIRED header from base64 JSON and parsed each 402 body.
-
Clean v2: the header decodes to
x402Version: 2with CAIP-2 networks andamount, and the body doesn't contradict it. -
Clean v1: a body-only challenge with
x402Version: 1,maxAmountRequiredand legacy network names. - Mixed: anything in between.
For 34 live services, a public directory catalog had recorded the route's price, network, asset and payTo. We compared those values field by field with the live challenge, and compared the version of each service's own discovery file with the version it serves live.
Summary table
| Check | Result | Share |
|---|---|---|
| Paid route returned a live HTTP 402 | 36 of 39 | 92.3% |
/.well-known/x402 missing or not JSON |
13 of 39 | 33.3% |
| Of those: 404 / HTML page served with 200 | 10 / 3 | |
Neither llms.txt nor openapi.json served |
5 of 39 | 12.8% |
| Agent paths return the site HTML with a 200 | 3 of 39 | 7.7% |
Live 402 sends a PAYMENT-REQUIRED header |
34 of 36 | |
| Header not readable cross-origin (CORS) | 20 of 34 | 58.8% |
| Of those: no CORS headers at all / allow-origin but no expose list / expose list but no allow-origin | 12 / 6 / 2 | |
402 body has no accepts[] challenge |
11 of 36 | 30.6% |
| Header hidden from browsers AND body has no challenge | 6 of 34 | 17.6% |
| Live challenge is not clean v2 | 8 of 36 | 22.2% |
| Catalog or discovery contradicts the live 402 | 2 of 34 | 5.9% |
| Passed every check | 7 of 36 | 19.4% |
Every number above is computed by script from the saved raw responses.
The five failure modes we saw most
1. The payment header is invisible to browser clients (20 of 34)
x402 v2 puts the challenge in a PAYMENT-REQUIRED response header. A browser lets cross-origin JavaScript read that header only if the 402 response carries Access-Control-Allow-Origin and also names the header in Access-Control-Expose-Headers. 12 services sent no CORS headers on the 402 at all. 6 sent Access-Control-Allow-Origin: * but no Access-Control-Expose-Headers, so the page sees the 402 status and still can't see the challenge. 2 exposed the header but sent no Access-Control-Allow-Origin on the 402, which blocks the whole response.
HTTP/1.1 402 Payment Required
Access-Control-Allow-Origin: *
PAYMENT-REQUIRED: eyJ4NDAyVmVyc2lvbiI6Mi...
(no Access-Control-Expose-Headers)
A browser wallet or web agent receives a 402 and no way to read the price. A server-side agent sees nothing wrong, which is why this goes unnoticed.
2. The body says nothing (11 of 36)
v2 allows the challenge to live only in the header, but 11 services also return a body with no accepts[] array. 6 return {}, 1 returns only {"error":"Payment required"}, and 4 return custom JSON that no x402 client parses. In 6 cases this combines with failure mode 1, so a browser client gets neither a readable header nor a usable body:
HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: eyJ4NDAy... (not exposed via CORS)
{}
3. No discovery, or discovery that lies to the parser (13 of 39)
10 services return 404 for /.well-known/x402. 3 return their website's HTML with a 200, the single-page-app catch-all. A naive client reads that 200 as a valid catalog and then fails on JSON parsing. Even among the 26 valid discovery files the layout varies: 20 use a top-level resources[] array and 6 use custom layouts (offers, endpoints, items, nested contracts) that a generic indexer has to special-case. In one more case, the route listed first in the discovery file returned 404.
GET /.well-known/x402 -> 200 text/html
<!doctype html><html><head><title>Example App</title>...
4. v1 and v2 mixed in one response (8 of 36)
- 2 services send a v2 header and a v1 body for the same route. The header says
"network":"eip155:8453","amount":"10000"and the body says"x402Version":1,"network":"base","maxAmountRequired":"10000". - 3 services put both
amountandmaxAmountRequiredin one v2 object, and one of them does it inside the header. - 2 serve a v1 discovery catalog while the live route challenges in v2.
- 1 is pure v1.
- 1 puts a v2 challenge in the body but sends no
PAYMENT-REQUIREDheader.
{"x402Version": 2,
"accepts": [{"scheme": "exact", "network": "eip155:8453",
"amount": "2000", "maxAmountRequired": "2000",
"asset": "0x0000...0000", "payTo": "0x0000...0000"}]}
Strict v2 clients may reject these objects, and v1 clients may pick the wrong field. The values happened to agree in every hybrid we saw, so today this is a latent bug rather than an overcharge.
5. Discovery drifts from the live route (2 of 34)
In both mismatches, the discovery file advertises x402Version: 1 while the live route answers in v2. Prices, networks, assets and payTo addresses matched the catalog everywhere else. We did not count one service whose price is documented as moving with network conditions. Drift was the rarest problem, and it's the one that costs money when it happens.
Builder checklist
- Add
PAYMENT-REQUIREDandPAYMENT-RESPONSEtoAccess-Control-Expose-Headers, and return CORS headers on the 402 response itself, not only on preflight. - Return a body with the same
x402Versionandaccepts[]as the header, or at least a JSON body that points to the header. Don't send{}. - Serve
/.well-known/x402asapplication/jsonwith a top-levelresources[]array. Exclude it,/llms.txtand/openapi.jsonfrom the single-page-app fallback so they 404 cleanly when absent. - Pick one dialect per response. For v2 that means CAIP-2 networks and
amountonly, with nomaxAmountRequiredand no"network":"base". - Generate discovery,
llms.txtand OpenAPI pricing from the same source the 402 middleware reads, and diff them in CI. - Test from a browser origin, not only from curl. Most of these failures only appear in a cross-origin request.
Limits of this sample
This is one snapshot of 39 services from one directory plus 6 publicly promoted services. It shows what a client meets today, not how the whole ecosystem behaves. We tested one paid route per service, so other routes on the same service may behave differently. We made no payments, so we did not check whether services deliver after settlement.
Want this run on your own endpoints?
We did the checks above without paying, signing or logging in. A private audit goes further: every route on your service, payment and settlement edge cases, and a written fix list. Audits are private and by invitation: https://www.younanix.com/private-audit
This article was written with the help of AI and reviewed and fact-checked by our team before publishing.
來源:DEV Community · dev.to