B402 Bazaar is an opt-in discovery extension for paid APIs and resources. A merchant can attach machine-readable metadata to an x402 V2 payment payload. After a successful settlement, B402 stores the metadata so it can be indexed by the B402 Bazaar service.
The extension does not change payment verification or settlement. If it is absent, the payment flow works normally.
Add the Extension
Place the metadata under paymentPayload.extensions.bazaar in the V2 Settle request. You may reuse
the same payload for Verify, but only a successful Settle stores metadata for indexing:
Code
Fields
| Field | Required | Description |
|---|---|---|
info | Yes | Input and output metadata. info.input.type is required and must be http; include info.input.method for the HTTP method. |
schema | Yes | Valid JSON Schema Draft 2020-12 describing the info object. |
routeTemplate | No | Stable route template such as /v1/weather/:city; use :name for path parameters. |
description | No | Human-readable description of the paid resource. |
Unknown extension fields are ignored by B402. Keep metadata free of API keys, secrets, personal data, signatures, and other confidential values.
Publication Behavior
- Metadata is recorded only after a successful V2 settlement.
- The resource URL comes from
paymentPayload.resource.url. - Repeated successful settlements update the listing for the same merchant and resource.
- Missing or invalid
info,schema, orinfo.input.typeprevents the metadata from being indexed, even though the payment itself may still settle successfully. - Invalid Bazaar metadata does not grant payment validity; Verify and Settle still enforce all normal x402 requirements.
The Web3 B402 API currently exposes Bazaar metadata ingestion through V2 Settle. Bazaar search and catalog endpoints are a separate discovery surface and are not part of this Web3 REST API catalog.