# x402 Spend Preflight

> x402 Spend Preflight is a paid API for AI agents from x402-preflight-production.up.railway.app, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-31).

Validates an x402 payment request before execution, confirming the buyer has sufficient funds and the payment details are correct.

## Facts

- Endpoint: POST https://x402-preflight-production.up.railway.app/v1/preflight?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-spend-preflight-3f8a39ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gtMOKZOef3Cb3tGtk7pth

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-spend-preflight-3f8a39ad -d '<json body>'
```

Example prompt: Before my agent pays for that x402-gated API call, run a preflight check to confirm the payment details are valid and my wallet has enough USDC to cover it.

## When to prefer this

Use this endpoint when an autonomous agent needs to validate an x402 payment before executing it, especially in high-frequency or automated pipelines where failed payments would be costly or disruptive. Prefer this over attempting the payment directly when you want deterministic pre-checks, want to surface user-facing errors gracefully, or are building a payment guard layer into an agentic workflow.

## Known failure modes

- Insufficient wallet balance — returns validation failure with balance shortfall details
- Malformed payment header or invalid x402 payment details — returns schema validation error
- Target resource URL is unreachable or not an x402 endpoint — returns connectivity or format error
- Network timeout reaching the preflight service — returns HTTP 5xx
- Invalid or unsupported currency — returns unsupported currency error

## How this service works

Paid deterministic pre-payment validation for autonomous x402 buyers.

## Output

Returns a structured validation result indicating whether the x402 payment is feasible — including whether the wallet has sufficient funds, whether the payment parameters are correctly formed, and any error reasons if the payment would fail. Does not actually execute the payment.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-spend-preflight-3f8a39ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-preflight-production.up.railway.app](https://www.zero.xyz/host/x402-preflight-production.up.railway.app/llms.txt)
