# Agent Buyer Identity Preflight | x402 Purchase Governance

> Agent Buyer Identity Preflight | x402 Purchase Governance is a paid API for AI agents from base-agent-preflight.bytoken2023.workers.dev, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-14).

Pre-purchase risk assessment that verifies whether an AI agent's buyer identity, role, and context are appropriate for a given x402 API, dataset, or tool purchase before the transaction is executed.

## Facts

- Endpoint: GET https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/agent-risk/safe-transaction-review
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-buyer-identity-preflight-x402-purchase-governance-2ca16a0e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hHq4RAgTsNtYcuzmP0hiz

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-buyer-identity-preflight-x402-purchase-governance-2ca16a0e
```

Example prompt: Before you spend any USDC, run a preflight check on Base (eip155:8453) to make sure my agent wallet 0xABCDEF1234567890ABCDEF1234567890ABCDEF12 is cleared to buy the API at 0x9876543210ABCDEF9876543210ABCDEF98765432 for the action 'data.fetch' at 0.50 USDC.

## When to prefer this

Use this endpoint when an AI agent is about to execute an x402 micropayment purchase and you need a pre-transaction governance check — specifically to validate buyer identity fitness, product category compatibility, and spending policy compliance before committing USDC. Prefer this over post-hoc auditing when the cost of an unauthorized or policy-violating purchase is high, or when operating in a multi-agent environment where individual agents have restricted purchase scopes.

## Known failure modes

- Invalid wallet address format (non-0x hex) — 400 Bad Request
- Missing required query parameters (chain, from, to, action) — 400 or validation error
- Unrecognized chain identifier — error or unknown risk level
- Service unavailable or Cloudflare Worker timeout — 500 or 503
- High risk score returned — agent should block purchase but call itself succeeds
- Payment for preflight itself fails (USDC balance insufficient for the $0.25 fee)

## How this service works

Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.

## Output

Returns a JSON object containing a risk assessment with a risk_level (e.g. 'low', 'medium', 'high'), a numeric risk_score, any risk flags triggered, plus contextual data about the network, product, buyer identity, and provenance — helping the agent decide whether to proceed with the purchase.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "chain",
      "from",
      "to",
      "action"
     ],
     "properties": {
      "to": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "from": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "chain": {
       "type": "string",
       "pattern": "^[A-Za-z0-9:_ -]{2,80}$"
      },
      "action": {
       "type": "string",
       "pattern": "^[A-Za-z0-9_.:-]{2,80}$"
      },
      "amount_usdc": {
       "type": "string",
       "pattern": "^[0-9]+(?:\\.[0-9]{1,6})?$"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "network": {
       "type": "string"
      },
      "product": {
       "type": "string"
      },
      "activity": {
       "type": "object"
      },
      "identity": {
       "type": "object"
      },
      "assessment": {
       "type": "object"
      },
      "provenance": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "eip155:8453",
  "product": "safe-transaction-review",
  "assessment": {
   "flags": [],
   "risk_level": "low",
   "risk_score": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-buyer-identity-preflight-x402-purchase-governance-2ca16a0e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-agent-preflight.bytoken2023.workers.dev](https://www.zero.xyz/host/base-agent-preflight.bytoken2023.workers.dev/llms.txt)
