# x402 Payment Firewall

> x402 Payment Firewall is a paid API for AI agents from x402-payment-firewall.vercel.app, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-11).

Evaluates an x402 payment challenge against caller-defined security policies to decide whether an AI agent should allow, block, or flag a payment before signing.

## Facts

- Endpoint: POST https://x402-payment-firewall.vercel.app/api/evaluate?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-payment-firewall-46f24c28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_q8A1Uy-HivLNy3tE-vQcs

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-payment-firewall-46f24c28 -d '<json body>'
```

Example prompt: Before my agent signs this x402 payment challenge, run it through the payment firewall and check it against my no-single-payment-over-$10 policy — tell me the risk score and whether to allow or block it.

## When to prefer this

Use this endpoint when an AI agent is operating autonomously and needs a policy gate before signing or paying any x402 payment challenge — especially when you need risk scoring, auditability, or spending controls beyond simple balance checks. Prefer this over naive auto-sign logic whenever the agent may encounter untrusted or adversarial payment requests.

## Known failure modes

- Invalid or malformed x402 challenge payload returns a 400 error
- Missing or invalid policy definition causes evaluation to fail with a policy error
- Payment of 0.1 USDC not fulfilled results in a 402 response before evaluation occurs
- Unrecognized policy rules may be silently ignored or cause a validation error
- Upstream policy engine timeout returns a 503 or degraded response

## How this service works

Evaluate x402 payment challenges against caller-defined security policies before an AI agent signs or pays.

## Output

Returns a JSON object with a decision field ('allow', 'block', or 'flag'), a numeric riskScore (0-1), an array of reasons explaining the decision, and the evaluation mode ('paid' or 'free').

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "paid",
  "decision": {
   "reasons": [],
   "decision": "allow",
   "riskScore": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-payment-firewall-46f24c28/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-payment-firewall.vercel.app](https://www.zero.xyz/host/x402-payment-firewall.vercel.app/llms.txt)
