# x402 Autopay Policy Engine

> x402 Autopay Policy Engine is a paid API for AI agents from x402-endpoint-risk-corpus.mtree.workers.dev, paid per call via x402, $0.2/call, status unknown (last checked 2026-09-15).

Evaluates payee reputation and a proposed x402 call plan to produce an allow/allow_with_limits/manual_review/deny decision plus spending caps for autonomous payments

## Facts

- Endpoint: POST https://x402-endpoint-risk-corpus.mtree.workers.dev/v1/x402/autopay_policy
- Price: $0.2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-autopay-policy-engine-c5c37c19
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WvRrvyviwdx7Wvf1zHgnK

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-autopay-policy-engine-c5c37c19 -d '<json body>'
```

Example prompt: Before my agent auto-pays for calls to this x402 endpoint at payTo address 0xABC...123 on the domain api.example.com, run an autopay policy check — should it allow, allow with limits, send for manual review, or deny, and what spending caps should I set?

## When to prefer this

Use this endpoint when an AI agent needs a pre-authorization risk assessment before executing an autonomous x402 micropayment — especially when the payee is unknown, the payment is recurring, or spending caps need to be established. Prefer this over manual research when you need a structured allow/deny decision backed by observed corpus data.

## Known failure modes

- Unknown payee wallet with no corpus history returns low-confidence manual_review decision
- Malformed call plan JSON causes 400 validation error
- Payment not included or incorrect USDC amount causes 402 payment required error
- Insufficient corpus data for the domain may yield conservative deny response
- Rate limits or overload may cause 429 or 503 errors

## How this service works

Turn payee reputation and a proposed call plan into allow / allow_with_limits / manual_review / deny plus caps for autonomous x402 payment. Returns JSON. Price 0.20 USDC on Base via x402. Demo/preview: https://x402-endpoint-risk-corpus.mtree.workers.dev/demo/autopay_policy. Contact: https://x402-endpoint-risk-corpus.mtree.workers.dev/contact.

## Output

A JSON object containing a policy decision (one of: allow, allow_with_limits, manual_review, deny), recommended per-call and daily spending caps, payee reputation signals from the corpus, and reasoning for the classification.

## Example request

```json
{
 "input": {
  "body": {
   "domain": "api.example.com",
   "pay_to": "0x742d35Cc6634C0532925a3b844Bc9e7595f42bE",
   "price_micro": 50000,
   "quality_gate": "standard",
   "planned_calls": 100,
   "session_cap_usd": 10
  },
  "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",
     "anyOf": [
      {
       "required": [
        "pay_to"
       ]
      },
      {
       "required": [
        "domain"
       ]
      },
      {
       "required": [
        "url"
       ]
      }
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri"
      },
      "domain": {
       "type": "string"
      },
      "pay_to": {
       "type": "string"
      },
      "price_micro": {
       "type": "integer",
       "minimum": 0
      },
      "quality_gate": {
       "type": "string"
      },
      "planned_calls": {
       "type": "integer",
       "minimum": 1
      },
      "session_cap_usd": {
       "type": "number",
       "minimum": 0
      }
     }
    },
    "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-autopay-policy-engine-c5c37c19/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)
