# x402 Dev Tools – Payment Header Decoder

> x402 Dev Tools – Payment Header Decoder is a paid API for AI agents from dev.kagurazaka.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-30).

Decodes and explains x402 payment headers (PAYMENT-REQUIRED, PAYMENT-SIGNATURE, or PAYMENT-RESPONSE) in plain English, flagging validation issues like expired authorizations, wrong domains, or missing Bazaar extensions.

## Facts

- Endpoint: POST https://dev.kagurazaka.dev/v1/decode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-dev-tools-payment-header-decoder-b22d2385
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VnCfEFxGxUIbVWOTqlr-G

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-dev-tools-payment-header-decoder-b22d2385 -d '<json body>'
```

Example prompt: Can you decode this x402 payment-required header for me and tell me if there are any problems with it — what's the price, which network, who gets paid, and is anything expired or misconfigured? Here's the header value: eyJ4NDAyVmVyc2lvbiI6Mn0=

## When to prefer this

Use this endpoint when you need to inspect, debug, or validate any x402 protocol payment header — whether you're a developer building an x402 client or server, an agent troubleshooting payment failures, or a seller verifying Bazaar compliance. It handles all three header types (payment-required, payment-signature, payment-response) for both x402 v1 and v2, and automatically detects the type if unknown. Prefer it over manual base64 decoding or generic JSON parsers because it applies x402-specific validation rules (EIP-712 domains, USDC contract addresses, authorization windows, Bazaar extensions) and returns human-readable findings.

## Known failure modes

- Invalid or malformed base64 input — returns parse error
- Unknown header kind when auto-detection fails — returns ambiguous kind error
- Header value is empty or missing — returns validation error
- JSON header with missing required fields — returns incomplete header error
- Network not recognized — returns unknown network finding

## How this service works

Decodes a PAYMENT-REQUIRED, PAYMENT-SIGNATURE or PAYMENT-RESPONSE header (x402 v2, or X-PAYMENT / X-PAYMENT-RESPONSE of v1), base64 or JSON, detecting which it is. Explains it in plain terms (price in dollars, network, payer and payee, validity window, explorer link) and lists problems: wrong USDC EIP-712 domain, expired or not-yet-valid authorizations, amount or payee mismatches, missing Bazaar extension.

## Output

Returns the decoded header type (payment-required, payment-signature, or payment-response), a plain-English summary (price in USD, network, payer/payee addresses, validity window, explorer link), a structured decoded object, and a list of findings with severity levels (info, warning, error) flagging issues such as wrong EIP-712 USDC domain, expired or not-yet-valid authorizations, amount or payee mismatches, and missing Bazaar discovery extension.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "kind": {
   "enum": [
    "payment-required",
    "payment-signature",
    "payment-response",
    "auto"
   ],
   "type": "string",
   "description": "default auto"
  },
  "header": {
   "type": "string",
   "description": "the header value (base64 or JSON); a leading 'Header-Name:' is ignored"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "kind": "payment-required",
  "accepts": [
   {
    "pay_to": "0xe6f7508ab572a4dc9c7486ea017b100d83f3c3f8",
    "scheme": "exact",
    "network": "eip155:8453",
    "price_usd": 0.001,
    "network_name": "Base"
   }
  ],
  "decoded": {
   "x402Version": 2
  },
  "summary": "Pay $0.001 on Base for https://api.example.com/v1/weather",
  "findings": [
   {
    "level": "info",
    "message": "no bazaar extension: the CDP Bazaar lists the resource only with it (declareDiscoveryExtension)"
   }
  ],
  "x402_version": 2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-dev-tools-payment-header-decoder-b22d2385/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from dev.kagurazaka.dev](https://www.zero.xyz/host/dev.kagurazaka.dev/llms.txt)
