# 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.15/call, status unknown (last checked 2026-09-14).

Performs a pre-purchase risk and identity check on a merchant wallet before an AI agent executes an x402 micropayment, returning a risk score and flags.

## Facts

- Endpoint: GET https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/transaction/preflight-lite
- Price: $0.15/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-c9df1f7c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_o7MdH9ctUmXuSUWskBvfQ

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-c9df1f7c
```

Example prompt: Before my agent pays the merchant at 0xABC123...def (Base network) $2.50 USDC for that dataset API, run a preflight trust check on that merchant address and tell me if the risk level is acceptable.

## When to prefer this

Choose this endpoint when an AI agent needs to perform a governance preflight check before executing an x402 micropayment on the Base network — specifically when you want a structured risk score and flags on a merchant wallet before committing funds. Prefer this over generic on-chain explorers when you need a single opinionated risk/identity verdict rather than raw transaction data, and when operating in an automated agentic payment workflow where a human approval gate is not present.

## Known failure modes

- Missing required merchant_address parameter returns 400 validation error
- Invalid Ethereum address format (not 0x + 40 hex chars) causes schema rejection
- Unknown or brand-new wallet with no on-chain history may return empty activity and indeterminate risk
- Invalid transaction hash format (not 0x + 64 hex chars) returns validation error
- Cloudflare Worker cold-start or rate limiting may return 503 or timeout
- Wallet on a network other than Base (eip155:8453) may return unsupported network error

## 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 the network (eip155:8453 for Base), product identifier, risk_score (0–1 numeric), risk_level (e.g. 'low', 'medium', 'high'), an array of flags describing specific concerns, an identity object with wallet provenance details, and an activity summary covering recent on-chain behavior within the specified time window.

## 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": [
      "merchant_address"
     ],
     "properties": {
      "tx": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{64}$",
       "description": "Optional Base transaction hash for receipt and payment proof checks."
      },
      "owner": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "since": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}T.+Z$",
       "description": "Wallet activity lower bound. Defaults to 30 days ago."
      },
      "token": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "spender": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "gas_limit": {
       "type": "string",
       "pattern": "^[0-9]+$"
      },
      "from_block": {
       "type": "string",
       "pattern": "^[0-9]+$"
      },
      "wallet_address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "Buyer, merchant, or workflow wallet to inspect."
      },
      "expected_amount": {
       "type": "string",
       "pattern": "^[0-9]+(?:\\.[0-9]{1,6})?$",
       "description": "Expected USDC amount for payment proof."
      },
      "contract_address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "merchant_address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "Merchant or payment recipient to trust-score."
      },
      "expected_recipient": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "Expected USDC recipient for payment proof."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "network": {
       "type": "string"
      },
      "product": {
       "type": "string"
      },
      "activity": {
       "type": "object"
      },
      "id
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "eip155:8453",
  "product": "x402-transaction-preflight-lite",
  "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-c9df1f7c/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)
