# Nightshift Labs x402 Preflight Check

> Nightshift Labs x402 Preflight Check is a paid API for AI agents from nightshift-x402.nightshift-labs.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-18).

Probes an x402-gated endpoint URL to assess its payment configuration, liveness, and on-chain payer activity before committing a payment

## Facts

- Endpoint: GET https://nightshift-x402.nightshift-labs.workers.dev/v1/x402/preflight?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nightshift-labs-x402-preflight-check-e642dea4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NZtRvyM0KoE1Y8JfgOx85

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 nightshift-labs-x402-preflight-check-e642dea4
```

Example prompt: Before I pay to call it, can you do a preflight check on this x402 endpoint — https://some-api.example.com/data — using a GET request and look back 5 days of on-chain payer history, so I can see if it's properly set up and what the payment options look like?

## When to prefer this

Use this endpoint when you need to verify an x402-gated API's payment configuration, check on-chain payer history, or assess payment options before committing USDC — especially useful for agents performing due diligence on new pay-per-call integrations or auditing existing ones. Prefer this over simply attempting a paid call when you want to avoid failed payments or unexpected pricing.

## Known failure modes

- Target URL is not an x402-compliant endpoint — verdict may be 'not_x402' with issues listed
- Target URL is unreachable or returns unexpected status — probe may fail or return error issues
- Days parameter out of range (must be 1–7) — validation error
- URL parameter missing — request rejected with schema validation error
- On-chain data may be delayed or incomplete if the Base network is congested

## How this service works

x402 seller preflight: check a paid endpoint BEFORE paying. Probes it unpaid, parses the 402 (v2 header or v1 body) and checks each option: scheme, network, asset is real USDC on Base, EIP-712 name/version match on-chain, payTo not a burn address, amount, timeout, discovery metadata. Plus on-chain seller reputation: USDC payments to payTo over 1-7 days (distinct payers, total, last payment). Returns verdict ok/caution/fail, issues and the recommended option.

## Output

A JSON object containing: a boolean x402 flag, a verdict string (e.g. 'ok'), a list of payment options (each with chain, scheme, USD amount, asset name, EIP-712 metadata, and pass/fail checks), the recommended option index, transport method, x402 version, and a payToActivity block with stats including total USDC received, number of distinct payers, top payer share, transfers at advertised price, and hours since last incoming transfer.

## 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": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "https URL of the x402-paid endpoint"
      },
      "days": {
       "type": "integer",
       "maximum": 7,
       "minimum": 1,
       "description": "on-chain payer history window in days (default 3; at most ~11 h is scanned per call, see windowHoursCovered)"
      },
      "method": {
       "enum": [
        "GET",
        "POST"
       ],
       "type": "string",
       "description": "HTTP method to probe (default GET)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "x402": true,
  "issues": [],
  "status": 402,
  "options": [
   {
    "ok": true,
    "chain": "base",
    "checks": [],
    "eip712": {
     "name": "USD Coin",
     "version": "2"
    },
    "scheme": "exact",
    "amountUsd": 0.005,
    "assetName": "USD Coin",
    "assetIsUsdc": true
   }
  ],
  "verdict": "ok",
  "transport": "header (x402 v2)",
  "x402Version": 2,
  "payToActivity": {
   "partial": false,
   "totalUsdc": "0.23",
   "windowDays": 3,
   "topPayerShare": 0.69,
   "distinctPayers": 4,
   "lastIncomingHoursAgo": 50.8,
   "incomingUsdcTransfers": 50,
   "transfersAtAdvertisedPrice": 44
  },
  "recommendedOption": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nightshift-labs-x402-preflight-check-e642dea4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nightshift-x402.nightshift-labs.workers.dev](https://www.zero.xyz/host/nightshift-x402.nightshift-labs.workers.dev/llms.txt)
