# Spend Gate — Agent Wallet Pre-Payment Coherence Check

> Spend Gate — Agent Wallet Pre-Payment Coherence Check is a paid API for AI agents from mcp-x402.onrender.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-31).

Runs a multi-signal coherence gate check before an AI agent wallet pays an invoice, scoring provider trust, payload safety, price sanity, and delivery history to return a pay/reject consensus verdict.

## Facts

- Endpoint: POST https://mcp-x402.onrender.com/x402/spend-gate?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spend-gate-agent-wallet-pre-payment-coherence-check-f3dc2388
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pbcNoR8yR7Y5xrNE9u1Rc

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 spend-gate-agent-wallet-pre-payment-coherence-check-f3dc2388 -d '<json body>'
```

Example prompt: Before paying that 0.05 USDC invoice from api.example.com for a data-enrichment tool, run the Spend Gate coherence check — is the provider trustworthy, is the price sane for the 'data' category, and does it pass the delivery history vote?

## When to prefer this

Use this endpoint whenever an AI agent wallet is about to autonomously approve a USDC payment and you want a pre-flight coherence check combining provider trust, price sanity, and delivery reputation before funds are released. Ideal for agentic pipelines where human oversight is absent and spending guardrails are critical. Prefer this over ad-hoc trust logic when you need a single scored verdict rather than building your own multi-signal risk model.

## Known failure modes

- Low coherence score (< 0.6) results in gate_pass: false and consensus: 'reject' — agent should not pay
- Unknown payee domain yields low provider trust signal, likely reject
- Quoted amount exceeds policy_cap_usdc or default category cap, returns reject
- Manifest URL malformed or unreachable causes payload_safety path to fail or be skipped
- Payment challenge expired or signature invalid — x402 payment itself rejected upstream

## How this service works

Spend Gate — Coherence Gate check before an agent wallet pays an invoice: provider trust and payload safety (real verdicts via the fleet operator lane, $0 upstream toll), price sanity (cap-only) and OmniGate delivery history vote pay/reject; coherence = |Σ w·d| / Σ w, pass needs coherence ≥ 0.6 and a pay-side consensus; Jev reviews only on a pass. Pay 0.005 USDC on Base using the fresh PAYMENT-REQUIRED challenge and caller-authorized PAYMENT-SIGNATURE.

## Output

Returns a JSON object with a coherence score (0–1, pass threshold ≥ 0.6), a consensus field ('pay' or 'reject'), a gate_pass boolean, an optional Jev review object populated on pass, and a paths array listing which check paths were evaluated.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "payee": {
   "type": "string",
   "description": "Payee domain and/or endpoint URL the wallet is about to pay."
  },
  "manifest_url": {
   "type": "string",
   "description": "Optional npm/PyPI/crates package page URL for the payload_safety path."
  },
  "quoted_amount": {
   "type": "number",
   "description": "Quoted amount in USDC."
  },
  "tool_category": {
   "type": "string",
   "description": "Category of the tool/service being bought (selects the v1 default cap)."
  },
  "policy_cap_usdc": {
   "type": "number",
   "description": "Optional caller policy cap in USDC."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "example": {
  "jev": {},
  "paths": [],
  "product": "Spend Gate",
  "coherence": 1,
  "consensus": "pay",
  "gate_pass": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spend-gate-agent-wallet-pre-payment-coherence-check-f3dc2388/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mcp-x402.onrender.com](https://www.zero.xyz/host/mcp-x402.onrender.com/llms.txt)
