# Agent Spend Assurance

> Agent Spend Assurance is a paid API for AI agents from hermesplant.com, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-16).

Runs a deterministic safety gate on wallet risk and x402 payment policy before consequential agent actions, returning an allow/deny decision with HMAC-signed evidence receipts.

## Facts

- Endpoint: GET https://hermesplant.com/api/agent-services/spend-assurance/run
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-spend-assurance-5c8fac76
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LBnFfo9ixIkDp-Ug78hB_

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 agent-spend-assurance-5c8fac76
```

Example prompt: Before my agent signs and retries this x402 payment challenge for the resource at api.example.com, run a spend assurance check on my wallet — assess the risk level and tell me if I should proceed, with a verifiable HMAC receipt I can store as evidence.

## When to prefer this

Choose this endpoint when an AI agent needs a deterministic, policy-driven safety gate specifically for x402 payments combined with wallet risk scoring and tamper-evident receipt generation — particularly when audit trails and machine-readable evidence of spend decisions are required. Prefer this over generic fraud checks when the x402 protocol, wallet sanctions screening, and HMAC-signed receipts are all needed in a single call.

## Known failure modes

- Missing required wallet or payment fields returns a validation error
- High-risk or sanctioned wallet triggers a deny decision with a block recommended action
- Invalid or replayed x402 challenge may return a deny with replay-detected evidence
- Malformed bodyType or method enum causes a 400-level rejection
- Unreachable receipt verify URL may indicate a transient service issue

## How this service works

One signed preflight for an autonomous x402 payment: WalletGuard counterparty screening, Payment Policy challenge validation, and structured evidence verification. Returns allow, deny, or needs_review plus the component findings and a tamper-evident service receipt. Caller-provided wallet context only; no external chain-intelligence feed.

## Output

Returns a JSON object with an overall allow/deny decision, wallet risk level and score, recommended action (e.g. 'proceed_with_standard_controls' or 'sign_and_retry_payment'), a payment-specific sub-decision, and an HMAC-SHA-256 signed receipt with a verify URL for tamper-evident audit evidence.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "runId": {
   "type": "string",
   "description": "Optional caller run identifier."
  },
  "wallet": {
   "type": "object",
   "description": "WalletGuard context: wallet plus optional labels, sanctionsHits, exposures, transfers, and fundingSources."
  },
  "payment": {
   "type": "object",
   "description": "Payment Policy input: resource, x402 challenge fields, buyer policy, and optional replay context."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "assessed",
  "wallet": {
   "riskLevel": "low",
   "riskScore": 0,
   "recommendedAction": "proceed_with_standard_controls"
  },
  "allowed": true,
  "payment": {
   "allowed": true,
   "decision": "allow",
   "recommendedAction": "sign_and_retry_payment"
  },
  "receipt": {
   "algorithm": "HMAC-SHA-256",
   "verifyUrl": "https://hermesplant.com/api/receipts/verify"
  },
  "service": "spend-assurance",
  "decision": "allow",
  "evidence": {
   "decision": "verified",
   "verified": true
  },
  "recommendedAction": "sign_and_retry_payment"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-spend-assurance-5c8fac76/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)
