payment_observed means this facilitator
validated payment terms carried with the listing. It does not prove origin
ownership, description accuracy, availability, or service quality.
Seller: declare an HTTP resource
Install the published helper from your seller project:weather.resource and weather.extensions in the route’s normal x402 402
configuration. bazaar.http() compiles readable query, path, header, and body
parameters into the official info fields and JSON Schema 2020-12. It
delegates to @x402/extensions/bazaar; it creates no proprietary extension or
wire format.
Do not hand-write the Bazaar JSON. The complete helper example is
packages/bazaar-sdk/examples/weather-http.ts;
the paid Express integration is in the seller guide.
Seller: declare an MCP tool
Usebazaar.mcp() and pass the same input schema already exposed by the MCP
tool:
Facilitator: observation and trust
The paying client copiesresource and extensions from PaymentRequired into
PaymentPayload. A hostile client can change both, so the facilitator treats
them as untrusted input.
After a successful configured payment observation, cataloging performs these
steps:
- Apply size, depth, text, schema, example, tag, and URL bounds.
- Validate the official Bazaar specification and canonical schema.
- Normalize the resource URL and compute its catalog identity.
- Compare ownership, metadata versions, and payment options.
- Store the observation and enqueue search indexing when applicable.
- Encode the catalog outcome in the official
EXTENSION-RESPONSESheader.
bazaar.status = "rejected"; successful, processing, and rejected outcomes use
the official extension response shape.
Identity, versions, and liveness
HTTP and MCP resources use different identities:- HTTP: normalized origin + validated URL/template path + uppercase method.
- MCP:
(resource.url, input.toolName)after URL normalization.
- identical metadata refreshes
last_seen; - changed metadata from the same
payTocreates a new version; - changed price, timeout, or other terms appends a payment option and retires the prior option for new observations;
- changed
payTois quarantined instead of silently taking ownership; - stale resources are demoted and excluded from discovery by default.
payment_observed, not origin verification.
The canonical trust model and lifecycle details live in
facilitator/docs/CATALOG-TRUST.md.
Discovery HTTP API
The public read-only surface is:
Standard filters are
type, network, scheme, payTo, and extensions.
This implementation also accepts asset; it is implementation-specific pending
upstream standardization. Bazaar v2 defines no price filter, so openx402 does
not expose one.
Browse
From any directory:items and includes pagination.cursor. When the cursor is
non-null, request the next page with the same filters:
Search
From the same directory and shell:resources. Continue with its cursor while preserving the
query and filters:
invalid_cursor. Cursors also expire.
Resolve one identity
For HTTP, sendtype and url:
toolName: