Skip to main content
POST
/
v2
/
x402
/
validate
Validate x402 endpoint
curl --request POST \
  --url https://api.cdp.coinbase.com/platform/v2/x402/validate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resource": "https://api.example.com/weather/forecast",
  "method": "GET"
}
'
{
  "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"
    }
  }
}

Body

application/json

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.

Required string length: 12 - 2048
Pattern: ^https://.*$
Example:

"https://api.example.com/weather/forecast"

method
enum<string>
default:GET

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.

Available options:
GET,
POST
Example:

"GET"

Response

Successfully validated the x402 endpoint.

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.

Example:

true

statusCode
integer | null
required

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

Example:

402

x402Version
integer | null
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.

Example:

2

preflight
object[]
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
x402V2PaymentRequirements · object
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
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.

Example:
{
"info": {
"input": { "type": "http", "method": "GET" }
},
"schema": {}
}
simulation
object
required

The simulated facilitator decision for the x402 endpoint.

Example:
{ "outcome": "accepted" }
index
object
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:
{
"active": true,
"lastCrawledAt": "2026-06-01T12:00:00Z",
"quality": {
"l30DaysTotalCalls": 42,
"l30DaysUniquePayers": 15,
"lastCalledAt": "2026-06-01T12:00:00Z"
}
}