# Lumen x402 Header Lint & Decoder

> Lumen x402 Header Lint & Decoder is a paid API for AI agents from lumenworks-x402-decoder.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-11).

Decodes and lints x402 PAYMENT-REQUIRED, PAYMENT-SIGNATURE, or PAYMENT-RESPONSE headers (base64 or JSON), returning the header kind, decoded object, and any errors or warnings about CAIP-2, checksum, EIP-712 domain, or expiry.

## Facts

- Endpoint: POST https://lumenworks-x402-decoder.onrender.com/v1/x402/lint?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lumen-x402-header-lint-decoder-26259465
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RyHTv7k3rxcdy2YleJ68l

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 lumen-x402-header-lint-decoder-26259465 -d '<json body>'
```

Example prompt: Can you decode and lint this x402 PAYMENT-REQUIRED header for me and tell me if there are any errors or warnings — especially around the CAIP-2 network, EIP-712 domain, and expiry? Here's the base64 value: eyJ4NDAyVmVyc2lvbiI6Mn0=

## When to prefer this

Use this endpoint when you need to programmatically validate or debug an x402 HTTP payment header — especially when integrating x402-enabled APIs and want to catch CAIP-2 network mismatches, bad EIP-712 domains, invalid checksums, or expired payment requests before signing or submitting. Prefer this over manual inspection when the header is base64-encoded or when you need structured error reporting.

## Known failure modes

- Invalid base64 input returns decode error
- Unrecognized header kind returns unknown type error
- Missing required fields in JSON body trigger validation errors in issues array
- Network connectivity issues to onrender.com hosting may cause 503 timeouts
- Malformed CAIP-2 network string flagged as error in issues but still returns decoded object

## How this service works

Decode and lint an x402 PAYMENT-REQUIRED / PAYMENT-SIGNATURE / PAYMENT-RESPONSE header (base64 or JSON): kind, decoded object, errors/warnings (CAIP-2, checksum, EIP-712 domain, expiry).

## Output

A JSON object with: ok (boolean indicating no critical errors), kind (PAYMENT-REQUIRED, PAYMENT-SIGNATURE, or PAYMENT-RESPONSE), decoded (the full parsed header object including accepts array, resource URL, x402Version, amounts, payTo address, network, scheme, and timeout), and issues (an array of errors and warnings covering CAIP-2 identifiers, address checksums, EIP-712 domain fields, and expiry status).

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "kind": "PAYMENT-REQUIRED",
  "issues": [],
  "decoded": {
   "accepts": [
    {
     "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
     "extra": {
      "name": "USD Coin",
      "version": "2"
     },
     "payTo": "0xee9790cB3960952F585379F831a89b4e00B4029A",
     "amount": "2000",
     "scheme": "exact",
     "network": "eip155:8453",
     "maxTimeoutSeconds": 120
    }
   ],
   "resource": {
    "url": "https://lumenworks-x402-decoder.onrender.com/v1/tx/explain"
   },
   "x402Version": 2
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lumen-x402-header-lint-decoder-26259465/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from lumenworks-x402-decoder.onrender.com](https://www.zero.xyz/host/lumenworks-x402-decoder.onrender.com/llms.txt)
