> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate an x402 endpoint

The **validate endpoint** lets sellers and agents check that an x402 endpoint's Bazaar-discovery configuration is correct *before* going live. CDP probes the seller's URL live, runs a set of preflight checks, and reports whether the [CDP Facilitator](/x402/core-concepts/facilitator) would index the resource for [Bazaar discovery](/x402/bazaar).

<Info>
  This endpoint is **read-only**: it performs no payment and does not index the resource. Use it as a pre-flight check while wiring up your route, and again any time you change your payment requirements or Bazaar extension.
</Info>

```
POST https://api.cdp.coinbase.com/platform/v2/x402/validate
```

No API key is required — this route is unauthenticated, like the [discovery endpoints](/x402/bazaar#cdp-discovery-endpoints-http).

For the full OpenAPI schema and status codes, see [Validate x402 endpoint](/api-reference/v2/rest-api/x402-facilitator/validate-x402-endpoint) in the x402 Facilitator API Reference.

## Request

| Field      | Type   | Required | Description                                                                                                                                                                            |
| ---------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `resource` | string | Yes      | HTTPS URL of the x402 endpoint to validate. Must use the `https://` scheme.                                                                                                            |
| `method`   | string | No       | HTTP method used to probe the endpoint. Only `GET` and `POST` are supported (default `GET`); other verbs are rejected because x402 resources are expected to respond to these methods. |

```bash theme={null}
curl -X POST https://api.cdp.coinbase.com/platform/v2/x402/validate \
  -H "Content-Type: application/json" \
  -d '{
    "resource": "https://api.example.com/weather/forecast",
    "method": "GET"
  }'
```

## Response

The response gives you the observed facts about your endpoint, the individual preflight check results, the facilitator's simulated accept/reject decision, and — if your endpoint is already indexed — its current Bazaar index status.

<AccordionGroup>
  <Accordion title="Example `200` JSON (validate)">
    ```json theme={null}
    {
      "valid": true,
      "statusCode": 402,
      "x402Version": 2,
      "preflight": [
        {
          "check": "reachable",
          "passed": true,
          "detail": "Endpoint responded to the probe request.",
          "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": "Endpoint advertises an extensions.bazaar block.",
          "severity": "required"
        },
        {
          "check": "parse",
          "passed": true,
          "detail": "Payment requirements parsed successfully.",
          "severity": "required"
        }
      ],
      "paymentRequirements": {
        "scheme": "exact",
        "network": "eip155:8453",
        "amount": "1000",
        "asset": "0x...",
        "payTo": "0x...",
        "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"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### Top-level fields

| Field                 | Type              | Description                                                                                                                                                              |
| --------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `valid`               | `boolean`         | `true` if all **required** preflight checks passed and the facilitator would index the resource.                                                                         |
| `statusCode`          | `integer \| null` | HTTP status code the endpoint returned, or `null` if it was not reachable.                                                                                               |
| `x402Version`         | `integer \| null` | x402 protocol version advertised by the endpoint, or `null` if it could not be determined. A bare integer (not the version enum) so malformed values are surfaced as-is. |
| `preflight`           | `array`           | All [preflight check](#preflight-checks) results in run order.                                                                                                           |
| `paymentRequirements` | `object \| null`  | Raw decoded 402 payment requirements, or `null` if the endpoint was unreachable or the payload was unparseable. Lets you inspect exactly what your endpoint advertises.  |
| `bazaarExtension`     | `object \| null`  | The `extensions.bazaar` block from the endpoint's discovery metadata, or `null` if absent or unreachable.                                                                |
| `simulation`          | `object`          | The [simulated facilitator decision](#simulation).                                                                                                                       |
| `index`               | `object \| null`  | [Bazaar index status](#index-status) if the endpoint is already indexed, otherwise `null`.                                                                               |

### Preflight checks

Each entry in `preflight` reports one check. Well-known `check` names are `reachable`, `returns_402`, `has_bazaar_extension`, and `parse` — additional checks may be added in future versions, so handle unknown values gracefully.

| Field      | Type      | Description                                                                                                                                                                                                                        |
| ---------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `check`    | `string`  | Name of the check.                                                                                                                                                                                                                 |
| `passed`   | `boolean` | Whether the check passed.                                                                                                                                                                                                          |
| `detail`   | `string`  | Human-readable explanation of the result.                                                                                                                                                                                          |
| `expected` | `string`  | The value the check expected, when applicable.                                                                                                                                                                                     |
| `actual`   | `string`  | The value the check observed, when applicable.                                                                                                                                                                                     |
| `severity` | `string`  | `required` — a hard indexing requirement that affects `valid` when it fails; or `advisory` — a quality recommendation (for example, a missing output schema) that improves discoverability but does not make the endpoint invalid. |

### Simulation

| Field             | Type     | Description                                                                            |
| ----------------- | -------- | -------------------------------------------------------------------------------------- |
| `outcome`         | `string` | `accepted` if the facilitator would index the resource, or `rejected` if it would not. |
| `rejectionReason` | `string` | Reason the resource would be rejected. Present only when `outcome` is `rejected`.      |

### Index status

Present only when the endpoint is already indexed in the Bazaar.

| Field           | Type             | Description                                                                                                                                                                                     |
| --------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `active`        | `boolean`        | Whether the indexed resource is active and served in discovery results.                                                                                                                         |
| `lastCrawledAt` | `string \| null` | When the endpoint was last crawled, or `null` if indexed but not yet crawled.                                                                                                                   |
| `quality`       | `object`         | Quality metrics (for example `l30DaysTotalCalls`, `l30DaysUniquePayers`, `lastCalledAt`), present only when the endpoint has call history. See [Quality ranking](/x402/bazaar#quality-ranking). |

## How to use it

1. **Before going live** — after wiring up your x402 middleware and [Bazaar extension](/x402/bazaar#extension-architecture), call `validate` to confirm your endpoint returns `402`, advertises a parseable `extensions.bazaar` block, and would be `accepted`.
2. **Inspect what you advertise** — read `paymentRequirements` and `bazaarExtension` to verify the payment terms and discovery metadata your endpoint is actually serving match what you intended.
3. **Fix advisory findings to rank higher** — advisory checks (like a missing output schema) do not block indexing but do affect [quality ranking](/x402/bazaar#quality-ranking). Address them to improve discoverability.

<Note>
  A passing `validate` result confirms your endpoint is *ready to be discovered*, not that it is already in search. Indexing still requires at least one successful **settlement** through the CDP Facilitator — see [When does my endpoint appear?](/x402/bazaar#how-it-works).
</Note>
