# x402 Endpoint Linter / Validator

> x402 Endpoint Linter / Validator is a paid API for AI agents from ai-policy-kit.moneymaker-ai.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-19).

Validates whether a given public HTTPS URL correctly implements the x402 payment protocol, returning lint errors, warnings, payment offers, and discoverability status.

## Facts

- Endpoint: GET https://ai-policy-kit.moneymaker-ai.workers.dev/api/x402-lint?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-endpoint-linter-validator-59c6e63e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_euSsY-iof184NYguzIBQT

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-linter-validator-59c6e63e
```

Example prompt: Can you lint my x402 endpoint at https://myapi.example.com/api/paid-resource using GET to check if the 402 payment response is correct and discoverable?

## When to prefer this

Use this endpoint when you need to programmatically verify that an API correctly implements the x402 micropayment protocol — especially before publishing an endpoint to an x402 discovery service, debugging why an endpoint isn't being accepted by x402 clients or bazaars, or automating CI checks for x402 compliance in a payment-gated API.

## Known failure modes

- Target URL is not publicly reachable — returns errors indicating connection failure
- URL does not return a 402 status — lint fails with missing payment-required response
- Malformed 402 response body — errors list specific JSON schema violations
- Missing or invalid payment offer fields (payTo, price, network) — flagged in errors array
- URL uses HTTP instead of HTTPS — rejected as invalid input

## How this service works

Generate an AI_POLICY.md and a pull request template with an AI-disclosure section for your open-source repo. Free, runs in your browser.

## Output

A JSON object indicating whether the endpoint passes x402 linting (ok: true/false), a list of errors and warnings describing protocol violations or misconfigurations, an array of payment offers each with payTo wallet address, price, scheme, and network chain, the HTTP status code observed, and a discoverability boolean.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "public https URL of the paid endpoint"
      },
      "method": {
       "enum": [
        "GET",
        "POST"
       ],
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "url": "https://ai-policy-kit.moneymaker-ai.workers.dev/api/policy",
  "errors": [],
  "offers": [
   {
    "payTo": "0x5b4Ca59741DE12DC212982b342392a063492a021",
    "price": "0.01 USDC",
    "scheme": "exact",
    "network": "eip155:8453"
   }
  ],
  "warnings": [],
  "http_status": 402,
  "discoverable": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-endpoint-linter-validator-59c6e63e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ai-policy-kit.moneymaker-ai.workers.dev](https://www.zero.xyz/host/ai-policy-kit.moneymaker-ai.workers.dev/llms.txt)
