# x402 Payment Preflight

> x402 Payment Preflight is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-19).

Validates x402 HTTP 402 payment requirements against caller-defined constraints (max USDC amount, allowed networks, scheme, recipient, expiry) before a wallet signs, returning eligible accepts and any blockers.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/payment-preflight?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-payment-preflight-c9026937
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Lp4TLCYuJ4VL2YCbSRmFB

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-preflight-c9026937 -d '<json body>'
```

Example prompt: Before my wallet signs anything, run a preflight on this x402 payment requirement object — enforce a max of 0.05 USDC, only allow Base network, and require at least 60 seconds of expiry remaining so I can see if there are any blockers.

## When to prefer this

Use this endpoint immediately after receiving an HTTP 402 response when your agent needs to enforce a spending policy, network allowlist, or expiry safety buffer before authorizing a wallet signature. Prefer it over ad-hoc client-side checks when you want a structured, auditable list of blockers and eligible accepts rather than rolling your own x402 validation logic.

## Known failure modes

- Missing or malformed requirements object returns a validation error
- max_amount_usdc set to 0 blocks all accepts
- allowed_networks list contains network identifiers not present in the payment requirements, resulting in all accepts blocked
- now_epoch_seconds not provided may cause incorrect expiry evaluation
- Payment requirements with no recipient field may trigger a blocker if recipient presence is enforced
- Service returns HTTP 402 itself (costs 0.002 USDC per call via x402)

## How this service works

Evaluate caller-supplied x402 payment requirements before a wallet signs them. Use after receiving HTTP 402 to enforce a maximum USDC amount, allowed networks, exact scheme, recipient presence, and an optional expiry buffer. Returns eligible accepts and explicit blockers for 0.002 USDC via x402 on Base; it never signs, pays, stores, or echoes a payment signature.

## Output

Returns a list of eligible payment accepts that pass all caller-supplied constraints, plus an explicit list of blockers (e.g. amount too high, disallowed network, missing recipient, insufficient expiry) explaining why any accepts were rejected. Never signs, pays, stores, or transmits a payment.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "requirements": {
   "type": "object"
  },
  "asset_decimals": {
   "type": "integer",
   "default": 6,
   "maximum": 18,
   "minimum": 0
  },
  "max_amount_usdc": {
   "type": "number",
   "minimum": 0
  },
  "allowed_networks": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "maxItems": 20,
   "minItems": 1
  },
  "now_epoch_seconds": {
   "type": "integer",
   "minimum": 0
  },
  "min_expiry_seconds": {
   "type": "integer",
   "default": 30,
   "maximum": 86400,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "policy": {
   "asset_decimals": 6,
   "expiry_checked": true,
   "max_amount_usdc": "0.002",
   "allowed_networks": [
    "eip155:8453"
   ],
   "min_expiry_seconds": 30
  },
  "schema": "delx/util-x402-payment-preflight/v1",
  "approved": true,
  "selected": {
   "index": 0,
   "pay_to": "0x1111111111111111111111111111111111111111",
   "scheme": "exact",
   "network": "eip155:8453",
   "amount_usdc": "0.001",
   "expiry_status": "ok"
  },
  "evaluations": [
   {
    "index": 0,
    "scheme": "exact",
    "network": "eip155:8453",
    "blockers": [],
    "amount_usdc": "0.001",
    "expiry_status": "ok",
    "pay_to_present": true
   }
  ],
  "eligible_count": 1,
  "evaluated_count": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-payment-preflight-c9026937/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
