x402 Facilitator

Validate x402 endpoint

Changed on

Validates 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.

post/v2/x402/validate

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP none

Request body

X402ValidateRequest required

Request to validate an x402 endpoint's bazaar-discovery configuration.

resource, string uri required

HTTPS URL of the x402 endpoint to validate. Must use the https:// scheme.

method, 'GET' | 'POST'

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.

X402ValidateResponse required

Response from validating an x402 endpoint's bazaar-discovery configuration.

valid, boolean required

Whether the endpoint is valid: all preflight checks passed and the facilitator would index the resource.

statusCode, integer nullable required

The HTTP status code returned by the endpoint, or null if the endpoint was not reachable.

x402Version, integer nullable required

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.

preflight, X402ValidateCheck[] required

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.

paymentRequirements, union required

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.

bazaarExtension, object nullable required

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.

simulation, X402ValidateSimulation required

The simulated facilitator decision for the x402 endpoint.

index, X402ValidateIndex nullable required

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_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    1 more change in this revision