Validate x402 endpoint
Changed onValidates an x402 endpoint's bazaar-discovery configuration by probing the seller's URL live. Returns a uniform array of preflight check results (reachable, returns402, hasBazaarExtension, parse) and a simulated facilitator accept/reject decision so sellers and agents can confirm their endpoint is ready to be discovered before going live. This operation is read-only: it performs no payment and does not index the resource.
Request
- Base URLhttps://api.cdp.coinbase.com/platform
- AuthHTTP none
Request body
Request to validate an x402 endpoint's bazaar-discovery configuration.
HTTPS URL of the x402 endpoint to validate. Must use the https:// scheme.
The HTTP method used to probe the endpoint. Only GET and POST are supported; other verbs are intentionally rejected because x402 resources are expected to respond to these methods.
Example request
{
"resource": "https://api.example.com/weather/forecast",
"method": "GET"
}Response
Successfully validated the x402 endpoint.
Response from validating an x402 endpoint's bazaar-discovery configuration.
Whether the endpoint is valid: all preflight checks passed and the facilitator would index the resource.
The HTTP status code returned by the endpoint, or null if the endpoint was not reachable.
The x402 protocol version advertised by the endpoint, or null if it could not be determined. Intentionally a bare integer rather than the X402Version enum so the validator can surface unsupported or malformed version values returned by non-conforming endpoints.
All check results in run order. Well-known check names are reachable, returns_402, has_bazaar_extension, and parse. Additional checks may be added in future versions.
The raw decoded payment requirements returned by the endpoint, or null if the endpoint was not reachable or did not return a parseable 402 payload. Lets sellers inspect exactly what their endpoint is advertising.
The extensions.bazaar block from the endpoint's discovery metadata, or null if the bazaar extension was absent or the endpoint was not reachable. Lets sellers verify the discovery configuration their endpoint is advertising.
The simulated facilitator decision for the x402 endpoint.
Bazaar index status for the endpoint, or null if the endpoint is not yet indexed. Present on every response regardless of simulation outcome.
Example response
{
"valid": true,
"statusCode": 402,
"x402Version": 2,
"preflight": [
{
"check": "reachable",
"passed": true,
"detail": "Endpoint responded within the timeout.",
"severity": "required"
},
{
"check": "returns_402",
"passed": true,
"detail": "Endpoint responded with HTTP 402 Payment Required.",
"expected": "402",
"actual": "402",
"severity": "required"
},
{
"check": "has_bazaar_extension",
"passed": true,
"detail": "Payment requirements include the bazaar discovery extension.",
"severity": "required"
},
{
"check": "parse",
"passed": true,
"detail": "Payment requirements parsed successfully.",
"severity": "required"
}
],
"paymentRequirements": {
"scheme": "exact",
"network": "base",
"maxAmountRequired": "100000",
"resource": "https://api.example.com/weather/forecast",
"description": "Real-time weather forecast data.",
"mimeType": "application/json",
"payTo": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"maxTimeoutSeconds": 60
},
"bazaarExtension": {
"info": {
"input": {
"type": "http",
"method": "GET"
}
},
"schema": {}
},
"simulation": {
"outcome": "accepted"
},
"index": {
"active": true,
"lastCrawledAt": "2026-06-01T12:00:00Z",
"quality": {
"l30DaysTotalCalls": 42,
"l30DaysUniquePayers": 15,
"lastCalledAt": "2026-06-01T12:00:00Z"
}
}
}Changes
- warning
added the new
policy_not_applicableenum value to theerrorTyperesponse property for the response status - warning
added the new
policy_not_applicableenum value to theerrorTyperesponse property for the response status - warning
added the new
policy_not_applicableenum value to theerrorTyperesponse property for the response status
1 more change in this revision
- warning