# Payment Policy Decision API

> Payment Policy Decision API is a paid API for AI agents from hermesplant.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Evaluates whether an AI agent's proposed payment action should be allowed or blocked based on configurable policy rules, risk scoring, and buyer-defined spend limits.

## Facts

- Endpoint: GET https://hermesplant.com/api/agent-services/payment-policy/decide
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payment-policy-decision-api-1dc04a2a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_66Hqtic0nYDY2t0Y4maV0

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 payment-policy-decision-api-1dc04a2a
```

Example prompt: Before my agent pays 0.007 USDC to 0x6d6E695b09861467c7d462f5AAF31cF3540B9192 on Base (eip155:8453) for calling https://api.exa.ai/search, run a policy check with idempotency key 'agent-run-2026-06-23-001' and tell me whether to allow or block the payment based on risk score and my buyer policy.

## When to prefer this

Use this endpoint when an AI agent needs a deterministic, policy-enforced safety gate before executing any consequential payment action — especially x402 crypto payments, infrastructure deploys, or MCP tool calls that involve spending. Prefer it over manual checks when you need machine-readable evidence receipts, idempotency guarantees, and risk scoring in a single call. It is the right choice when buyer-defined spend limits and audit trails are required for autonomous agent governance.

## Known failure modes

- Missing required 'resourceUrl' field returns a validation error
- Invalid network identifier (not in eip155 format) may cause schema rejection
- Conflicting buyer policy rules may result in unexpected deny decisions
- Non-positive amountUsd may fail schema validation
- Duplicate paymentIdentifier with different parameters may cause idempotency conflicts
- Unreachable facilitatorUrl may degrade risk scoring accuracy

## How this service works

Preflight an x402 payment before an autonomous agent signs it. Checks resource binding, method, scheme, network, asset, amount vs expected price, payTo, facilitator, timeout, replay and idempotency readiness, metadata leakage, buyer spend limits, allow-lists, and optional service-risk signals. Returns allow / deny / needs_review with evidence-backed findings and a redacted, log-safe record. Deterministic policy engine — loop it over every payment your agent makes.

## Output

Returns a structured decision object containing: allow/deny status, risk score (0-100), risk level (low/medium/high), reason codes explaining the decision, echoed payment details (payTo, scheme, network, amountUnits, amountUsd), idempotency readiness, payment identifier, resource URL and host, policy version applied, and a unique requestId for audit purposes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "tags": {
   "type": "array"
  },
  "asset": {
   "type": "string"
  },
  "payTo": {
   "type": "string"
  },
  "method": {
   "type": "string"
  },
  "scheme": {
   "type": "string"
  },
  "network": {
   "type": "string"
  },
  "metadata": {
   "type": "object"
  },
  "amountUsd": {
   "type": "number"
  },
  "amountUnits": {
   "type": "string"
  },
  "buyerPolicy": {
   "type": "object"
  },
  "resourceUrl": {
   "type": "string"
  },
  "serviceRisk": {
   "type": "object"
  },
  "facilitatorUrl": {
   "type": "string"
  },
  "maxTimeoutSeconds": {
   "type": "number"
  },
  "paymentIdentifier": {
   "type": "string"
  },
  "paymentPayloadResource": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "replay": {
   "idempotencyReady": true,
   "paymentIdentifier": "agent-run-2026-06-23-001"
  },
  "status": "decided",
  "allowed": true,
  "binding": {
   "paymentPayloadResource": null,
   "resourceMatchesPaymentPayload": null
  },
  "payment": {
   "payTo": "0x6d6E695b09861467c7d462f5AAF31cF3540B9192",
   "scheme": "exact",
   "network": "eip155:8453",
   "amountUnits": "7000"
  },
  "service": "payment-policy",
  "decision": "allow",
  "resource": {
   "url": "https://api.exa.ai/search",
   "host": "api.exa.ai",
   "method": "POST"
  },
  "amountUsd": 0.007,
  "requestId": "paypol_<uuid>",
  "riskLevel": "low",
  "riskScore": 3,
  "reasonCodes": [
   "service.tags-sensitive"
  ],
  "policyVersion": "payment-policy-v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payment-policy-decision-api-1dc04a2a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hermesplant.com](https://www.zero.xyz/host/hermesplant.com/llms.txt)
