← Blog
November 16, 2026 · 14 min

x402 Bazaar: templates listed as URLs, buyer paths made public

For a dynamic route like /weather/:city, the x402 Bazaar publishes the template itself as if it were a URL. Next to it sits whatever value the last indexed request used for :city. An agent that calls the listing as written can be charged for a city named :city. And the value next to the template can be another buyer's wallet, email or order ID.

On 2026-11-15, issue #4284 described both problems and sampled them. The author measured 5.3% of a 5,000-entry sample of Coinbase's public catalog and 1.6% of PayAI's. The same day, PayAI changed how its facilitator lists dynamic routes. Coinbase's catalog still lists templates.

We measured the whole thing. We downloaded both public catalogs on 2026-11-16 and sent one unpaid request to every host that lists a template. We ran the shipped TypeScript SDK (2.31.0) and the Python SDK (2.28.0) in local harnesses with a fake facilitator, and read the spec and code at main (1a08434). Templates are only part of the problem. Today a buyer's SDK can't keep its own path values out of the catalog without dropping the discovery extension entirely.

How a dynamic route reaches the catalog

Bazaar is x402's discovery layer, which we covered in our Bazaar post. Nobody registers a listing. The seller's 402 response declares a bazaar extension. The buyer's client copies that declaration into its payment payload. The facilitator extracts it on /verify or /settle and upserts a catalog entry.

Dynamic routes add two fields. The Bazaar spec defines routeTemplate as "the catalog key contract between server and facilitator." It defines info.input.pathParams as "concrete parameter values for this specific request." The spec's own example:

{
  "info": {
    "input": {
      "type": "http",
      "method": "GET",
      "pathParams": { "userId": "123" }
    }
  },
  "routeTemplate": "/users/:userId"
}

All three server SDKs implement that sentence literally. In TypeScript, bazaarResourceServerExtension.enrichDeclaration matches the route pattern against adapter.getPath() and writes the captures into pathParams. Python (extensions/bazaar/server.py) and Go (extensions/bazaar/server.go) do the same. Query parameters and bodies are not copied. Those fields keep the seller's declared examples, so a prompt sent in a POST body stays out of discovery. The path is the one part of the request that gets copied.

On the facilitator side, extractDiscoveryInfo in @x402/extensions builds the catalog key as origin + routeTemplate. It strips the query string from the resource URL and keeps paymentPayload.extensions, the buyer's echo, as the entry's extensions. The catalog key is the template, and pathParams holds the last indexed request's values. That last request might come from a buyer or from the seller's own test call. The catalog can't tell which.

What the reference code does with a placeholder

We built an Express server with @x402/express, @x402/extensions, @x402/evm and @x402/fetch at 2.31.0, published 2026-11-12. The /weather/:city route and its handler are copied from the repository's official Bazaar example. A real x402Client signed EIP-3009 authorizations. A fake facilitator approved everything and ran the real extractDiscoveryInfo on each settlement, so we could see exactly what a catalog would store.

// GET /weather/tokyo
402 pathParams {"city":"tokyo"} -> paid 200 {"city":"tokyo","weather":"rainy","temperature":65}
  catalogued: resourceUrl ".../weather/:city"  pathParams {"city":"tokyo"}

// GET /weather/:city  (the listing, called as written)
402 pathParams {"city":":city"} -> paid 200 {"city":":city","weather":"sunny","temperature":70}
  catalogued: resourceUrl ".../weather/:city"  pathParams {"city":":city"}

// GET /weather/%3Acity  (a client that percent-encodes the colon)
402 pathParams {"city":"%3Acity"} -> paid 200 {"city":":city","weather":"sunny","temperature":70}

The middleware issues a normal 402 for the literal pattern. The router matches :city as a value, and the example handler falls back to a default for unknown cities. The buyer pays and gets a made-up forecast for a city that doesn't exist. As we showed in our decline-path audit, the SDK cancels settlement only when the handler answers 400 or above. A handler with a fallback answers 200, so the payment settles.

A second route took a private value by design: /inbox/:email/messages, with examples: ["[email protected]"] declared in pathParamsSchema. A request for /inbox/[email protected]/messages reached the facilitator with {"email":"[email protected]"}. The SDK ignores the declared example when it fills pathParams. Only a facilitator that chooses to substitute it keeps the real address out of the catalog.

The Python SDK has a quieter version of this. Its enrichment starts with ext = dict(declaration), a shallow copy, and then writes input_data["pathParams"] = path_params into the nested dict. That dict is the route's own declaration. In x402 2.28.0 with the FastAPI middleware, one request for Alice's inbox left {"email": "[email protected]"} stored in the server's route config. The next request overwrote it. We looked for one buyer's value showing up in another buyer's 402 and found none: 0 in 200 concurrent requests on FastAPI, and 0 in 2,000 requests from 32 client threads against Flask's threaded server. The values still sit in server memory, and the TypeScript SDK doesn't do this.

The live catalog, measured

We paged Coinbase's public discovery endpoint (/platform/v2/x402/discovery/resources?type=http) to the end. On 2026-11-16 at 09:08 UTC it held 32,885 HTTP entries, every one with a bazaar extension.

1,306 entries carry a valid routeTemplate, starting with / and containing a :param. Of those, 1,237 entries on 283 hosts list the template itself as the resource URL. That is 3.8% of the catalog, a little under the issue's sample rate. 1,170 of the 1,237 are GET routes, 61 are POST, 5 are PUT and 1 is DELETE. Template entries account for 68,579 of the catalog's 1,631,489 calls over the last 30 days, about 4.2%, so agents do use these routes.

Only 90 of the 1,237 declare an example for every path parameter. JSON Schema already allows that through examples, default or enum in pathParamsSchema. These 90 are the only template entries that could be shown under a working URL without the seller doing anything more.

Then we called the listings as written. We sent one unpaid GET per host, 260 hosts in total, to the most-called template entry on each. We never paid. 153 hosts (58.8%) answered 402 for the literal placeholder. 39 answered 404, 3 answered 410, and 44 answered 400, which means those servers validate input before the paywall. The rest were 401, 403, 422, 5xx, redirects or connection errors.

The 402s are the trap. 108 of the 153 carried a bazaar extension whose pathParams echoed the placeholder back, such as {"address": ":address"}. A paying client would pass that to the facilitator unchanged. 135 of them named the template as their own resource.url. The median first-option amount was 10,000 base units, which is $0.01 if the asset is USDC (142 of the 153 offered Base first). 121 of the 152 that quoted an amount asked for 10,000 base units or less, which is low enough to fit under a typical default spend cap. As we argued in our post on price expectations, a cap limits how much an agent spends. It doesn't check what the agent gets for it.

Coinbase has a public validator at POST /platform/v2/x402/validate. We gave it one of these template URLs, an order-book route listed as .../book/:book. It returned valid: true, simulation accepted, and a passing bazaar.routeTemplate.matches_resource check. The resource URL "matches" the template because it is the template. Every check that validator runs passes for a URL no client should call.

Someone already signed a payment for ":address"

Each entry stores pathParams from its most recent indexed request. In 22 entries on 15 hosts, those values are the placeholders themselves: :address, :ticker, :id, the percent-encoded %3Aaddr, and {name}. So the latest request that refreshed the entry was for the template, not for a real value.

Each entry also carries quality.lastCalledAt next to its lastUpdated timestamp. For 24 of the 25 placeholder values, the two are within five seconds of each other, so the refresh came from a call on that route. The routes include sanctions screening by :address, a government-ID screening route, an IBAN validator and an email screening route. In each case a client asked for the placeholder, the route answered with a payment challenge, and the client signed a payment for it.

We can't see the buyers' wallets from the catalog and didn't try. We also can't tell from the catalog whether each of those payments settled or only reached /verify. We can say this much. The listing was the URL, and the server quoted a price for it. The catalog then recorded the placeholder as the latest input, so a signed payment payload for :address reached the facilitator.

What the catalog publishes about buyers

Of the 1,306 entries with a valid template, 1,236 carry pathParams values. Only 64 match the seller's declared example. The other 1,172, on 256 hosts, are values from whatever request was indexed last. Most are harmless: AAPL, BTC, chain IDs, block numbers. Some are not.

// Path values in the CDP catalog, 2026-11-16

174 EVM addresses, 35 UUIDs, 17 transaction hashes, 1 email

EVM addresses. 174 values, 53 distinct. We checked each one with eth_getCode on Base and Ethereum. 27 are contracts on at least one of them. 26 have no code on either chain. Five of those are obvious dummies, such as the zero address and 0x…dead. The other 21 sit in 27 catalog values on 16 hosts, under parameter names like address, signer and wallet. They look like wallets someone looked up.

UUIDs. 35 values on 15 hosts. Ten entries on six hosts sit under routes ending in /redeem, /download, /access, /uploads, /activate, /renew, /extend or /history. That includes an invite redemption and an artifact download. If such an ID is the only secret, publishing it publishes the key.

Other values. 17 transaction hashes on 7 hosts, 100 base58 values on 25 hosts (mostly Solana token mints, some under wallet), 53 domains, and one email address under an email-enrichment route.

We are not naming hosts or repeating values. They are public in the catalog already, and copying them here would only spread them further. Some may be sellers testing their own endpoints. A catalog that publishes the latest request's values can't tell a seller's test from a stranger's lookup, and neither can a reader.

The same echo-everything design shows up in one more place. One CDP entry carries a payment-identifier with an id. The extension spec says the client generates that value as its idempotency key. One entry is a small number. It still shows that the catalog stores whatever the buyer's payload contained.

The buyer cannot scrub its own echo

The obvious workaround is a client hook. It would keep the seller's declaration but replace pathParams with the declared example before signing. We tried it, and the server refuses it.

Both the TypeScript and Python resource servers check echoes. The echoed info must contain every field the server advertised, unchanged. Only fields an extension lists in dynamicInfoFields are exempt. Sign-in-with-x exempts nonce, issuedAt and expirationTime, and offer-receipt exempts offers. Bazaar declares none. Because the 402 itself advertises the buyer's path values, those values become fields the buyer must echo back unchanged. Same harness, same route, four variants of the echo:

verbatim               -> 200  catalogued {"email":"[email protected]"}
replace_with_example   -> 402  error "extension_echo_mismatch"
delete_pathParams      -> 402  error "extension_echo_mismatch"
drop_bazaar            -> 200  catalogued nothing

A buyer has two choices. It can publish its lookup or drop discovery entirely, which means the seller is never listed from that payment. A rule written for integrity, that the echo must match what was advertised, ends up enforcing the leak. The fix has to come from the server SDK, the spec or the facilitator. The buyer can't fix it alone.

One facilitator already changed the rules

PayAI didn't wait for the spec. Its Bazaar documentation now lists a dynamic route under a URL built from seller-declared examples. It reads examples[0], then example, default, const and enum[0] for each parameter. A declaration without an example for every parameter is rejected with resource_path_template, and the route is not listed. The payment itself goes through. The docs say it plainly: "Buyer values are never published." Resource URLs containing {param}, [param] or a * segment are rejected for the same reason.

We checked the result. PayAI's catalog on 2026-11-16 at 09:03 UTC held 16,073 HTTP entries. None had a template as its resource URL. Five carried a valid routeTemplate. The only one with a path value showed the seller's declared enum value, not a request's.

Issue #4284 proposes making that behaviour standard. Sellers declare examples. A catalog entry shows a callable URL with the template beside it. Catalog pathParams hold the seller's example, never request values. As an optional fourth step, the server SDK answers 404 when the request path is the literal pattern instead of issuing a 402. That last guard has to answer the request itself. Passing it through would let the handler run unpaid.

The issue leaves one question open: should the server SDK stop putting request values into pathParams at all? Our echo test answers it. As long as the 402 carries request values and the echo check is strict, every facilitator that stores the echo will publish them. A self-hosted or older facilitator won't strip them. Fixing it at the server side means the values never leave the seller's process. PR #3906, still open, already argues that info.input should describe the resource, not the request that discovered it. pathParams is the field that most clearly breaks that rule.

What it means for LLM4Agents

Our own surface is clean, partly by accident. We probed our gateway on 2026-11-16. An unpaid POST /v1/chat/completions returns a v2 402 with one exact option on Base and no bazaar extension. The route is static, so there's no template to list, and prompts travel in the body, which no SDK copies into discovery. Neither catalog lists api.llm4agents.com.

That last point is also a gap. Bazaar is where agents look for paid endpoints, and we aren't in it. When we add a listing, it should be a static POST route with a synthetic body example. It should have no pathParams and declare nothing from a real request. If we ever add per-resource routes, such as an agent's balance by wallet address or a job by ID, the stock SDK would put our customers' addresses and IDs into every catalog that indexes the payment. We would need to fix that before shipping.

The bigger exposure is on the buyer side. Agents that use our gateway also pay other x402 APIs with standard clients. Each of those payments echoes the seller's declaration verbatim, path values included. An agent that looks up a counterparty's wallet on a risk API leaves that address in a public catalog, attached to the route it used. For an agent doing due diligence, that's a log of its interests anyone can read. Templates are a cost problem too. An agent that discovers tools through a catalog, as we discussed in our metadata-injection audit, will pay for :address if nothing stops it.

Staying on the frontier

First, list the gateway properly. Add a bazaar declaration to the chat-completions 402 with a synthetic request example. Run it through Coinbase's validator and PayAI's /discovery/listing-status, and read EXTENSION-RESPONSES on the first settlement. It is a small change, and it puts us where agents look.

Second, protect the agents we serve when they buy elsewhere. Any x402 client we ship or recommend should say clearly what echoing bazaar publishes. It should offer a privacy mode that drops the extension when the route has a routeTemplate. Dropping the whole extension is the only change today's servers accept. The default stays verbatim, because sellers need listings to exist.

Third, never trust a listing as a URL. Any discovery code we write should reject resource URLs with :name, {name}, [name] or * segments. It should expand templates only from declared examples and require a 402 before suggesting a tool. Those three checks would have stopped every placeholder payment we found.

Fourth, build the route-pattern guard into our own middleware before we add any dynamic route. The guard answers 404 when a path segment is a literal :name or [name], and it must answer the request itself rather than pass it to the handler. Add a test that pays for the literal pattern and expects no settlement.

Fifth, contribute the numbers. Issue #4284 is a day old and still taking design input. Our catalog-wide counts belong there, along with three facts: the placeholder entries Coinbase has already indexed, the validator passing a template URL, and the echo check that blocks client-side scrubbing. Two concrete fixes go with them. Either the server SDK puts declared examples into pathParams, or Bazaar declares pathParams as a dynamic info field. The Python SDK's in-place mutation of the route declaration is a separate one-line fix worth filing on its own.

Paid endpoints that publish only what they declare.

LLM4Agents is an OpenAI-compatible gateway where autonomous agents pay per call in stablecoins over x402. Its routes are static and prompts never leave the request body.

Register an agent