# x402 Endpoint Attack Surface Check

> x402 Endpoint Attack Surface Check is a paid API for AI agents from x402-endpoint-risk-corpus.mtree.workers.dev, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-15).

Checks a candidate x402 endpoint for authorization binding, replay-window, paid-but-denied, catalog drift, and price-drain risk classes, returning a structured JSON risk assessment.

## Facts

- Endpoint: POST https://x402-endpoint-risk-corpus.mtree.workers.dev/v1/x402/attack_surface_check
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-endpoint-attack-surface-check-1a3d8d04
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UJ6r9mDvg3BErbhiT1U-W

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-endpoint-attack-surface-check-1a3d8d04 -d '<json body>'
```

Example prompt: Before my agent starts calling this x402 endpoint at https://api.example.com/v1/some-resource, can you run an attack surface check on it to flag any authorization binding, replay-window, paid-but-denied, catalog drift, or price-drain risks?

## When to prefer this

Use this endpoint when an AI agent or developer needs to pre-screen a specific x402 endpoint for known payment-layer attack classes — particularly authorization binding failures, replay vulnerabilities, or price-drain patterns — before committing autonomous payments to it. Prefer this over general API security scanners when the target is specifically an x402 micropayment endpoint and corpus-backed evidence is needed.

## Known failure modes

- Invalid or unreachable endpoint URL returns a 4xx error with a descriptive message
- Endpoint not found in the corpus returns low-confidence or empty risk scores
- Payment of 0.25 USDC not processed correctly results in 402 response blocking the check
- Malformed request body returns a validation error
- Corpus data stale for a given endpoint may result in outdated risk signals

## How this service works

Check authorization binding, replay-window, paid-but-denied, catalog drift, and price-drain classes for a candidate x402 endpoint. Returns JSON. Price 0.25 USDC on Base via x402. Demo/preview: https://x402-endpoint-risk-corpus.mtree.workers.dev/demo/attack_surface_check. Contact: https://x402-endpoint-risk-corpus.mtree.workers.dev/contact.

## Output

A JSON object containing risk classifications across five attack surface categories: authorization binding, replay-window, paid-but-denied, catalog drift, and price-drain. Each class includes a risk level and supporting evidence drawn from the x402 Bazaar-derived corpus.

## Example request

```json
{
 "input": {
  "body": {
   "url": "https://api.example.com/v1/payment-endpoint",
   "method": "POST",
   "require_body_digest": true,
   "require_idempotency_key": true,
   "post_settlement_deterministic": false
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri"
      },
      "method": {
       "enum": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
       ],
       "type": "string"
      },
      "require_body_digest": {
       "type": "boolean"
      },
      "require_idempotency_key": {
       "type": "boolean"
      },
      "post_settlement_deterministic": {
       "type": "boolean"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-endpoint-attack-surface-check-1a3d8d04/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-endpoint-risk-corpus.mtree.workers.dev](https://www.zero.xyz/host/x402-endpoint-risk-corpus.mtree.workers.dev/llms.txt)
