# Nomos Payment Preflight Decision API

> Nomos Payment Preflight Decision API is a paid API for AI agents from base-agent-preflight.bytoken2023.workers.dev, paid per call via x402, $0.2/call, status unknown (last checked 2026-09-14).

Evaluates an autonomous agent's proposed USDC payment before execution, returning a risk score, risk level, and any compliance flags.

## Facts

- Endpoint: POST https://base-agent-preflight.bytoken2023.workers.dev/x402/v1/decision/payment-preflight
- Price: $0.2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nomos-payment-preflight-decision-api-04197ae6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZIROGgKSVQeATdrv08WCw

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 nomos-payment-preflight-decision-api-04197ae6 -d '<json body>'
```

Example prompt: Before my agent sends 25.50 USDC to fulfill a vendor contract, run a Nomos payment preflight check for agent ID 'agent-xyz-001' with purpose 'vendor-invoice-payment' and flag it if the recipient risk level is HIGH.

## When to prefer this

Use this endpoint when an autonomous agent needs a decision gate before executing a USDC payment on Base — especially when the payment is to an unknown or variable-risk recipient, or when compliance evidence is required before disbursement. Prefer this over generic on-chain analytics when you need a structured risk_score + flags output specifically designed for agent-to-agent or agent-to-vendor payment flows, and when you want an auditable preflight record tied to a specific agent_id.

## Known failure modes

- Missing required query params (agent_id, amount_usdc, purpose) returns 400 validation error
- Invalid amount_usdc format (non-numeric or >6 decimal places) causes schema rejection
- Unknown or unsupported recipient_risk_level enum value returns validation error
- Payment of $0.20 USDC not completed triggers 402 Payment Required before assessment is returned
- Downstream risk engine unavailable may return 503 or empty assessment
- idempotency_key collision with different parameters may return cached or conflicting response

## 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 Base network identifier (eip155:8453), product name, and an assessment object with risk_score (numeric), risk_level (e.g. 'low', 'medium', 'high'), and a flags array listing any detected compliance or risk issues. May also include identity, activity, and provenance sub-objects for deeper analysis.

## 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": [
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "agent_id",
      "amount_usdc",
      "purpose"
     ],
     "properties": {
      "purpose": {
       "type": "string",
       "maxLength": 120,
       "minLength": 2
      },
      "agent_id": {
       "type": "string",
       "maxLength": 128,
       "minLength": 1
      },
      "amount_usdc": {
       "type": "string",
       "pattern": "^[0-9]+(?:\\.[0-9]{1,6})?$"
      },
      "idempotency_key": {
       "type": "string",
       "maxLength": 128
      },
      "recipient_risk_level": {
       "enum": [
        "LOW",
        "MEDIUM",
        "HIGH",
        "SEVERE"
       ],
       "type": "string"
      }
     }
    }
   },
   "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": "nomos-payment-preflight",
  "assessment": {
   "flags": [],
   "risk_level": "low",
   "risk_score": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nomos-payment-preflight-decision-api-04197ae6/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)
