# FastX402 x402 Payment Header Decoder

> FastX402 x402 Payment Header Decoder is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-17).

Decodes a base64-encoded x402 PAYMENT-REQUIRED header into human-readable payment details including network, token, amount, recipient address, and timeout.

## Facts

- Endpoint: GET https://fastx402.tools/x402-requirements-decode?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-x402-payment-header-decoder-f7370386
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0gZnI_L0Gzt243f-HxVMZ

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 fastx402-x402-payment-header-decoder-f7370386
```

Example prompt: Can you decode this x402 PAYMENT-REQUIRED header for me so I can see the network, USDC amount, recipient address, and timeout before I decide to pay? The header value is: eyJ4NDAyX3ZlcnNpb24iOjIsInBheW1lbnRzUmVxdWlyZWQiOlt7InNjaGVtZSI6ImV4YWN0IiwibmV0d29yayI6ImVpcDE1NTo4NDUzIn1dfQ==

## When to prefer this

Use this endpoint when an AI agent or developer receives an x402 HTTP 402 PAYMENT-REQUIRED response and needs to inspect or explain the encoded payment details before deciding whether or how to pay. It is especially useful for debugging, logging, auditing payment challenges, or presenting human-readable payment info to a user — rather than blindly submitting a payment. Prefer this over manual base64 decoding when you need structured, labelled output with USDC-friendly amounts and network names.

## Known failure modes

- Invalid or malformed base64 input returns an error field in the response
- Missing required 'header' query parameter causes a 400-level error
- Non-x402 or unsupported header format may return empty options array
- Network timeout or service unavailability returns a 5xx error

## How this service works

146 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

Returns a JSON object with the x402 version, the resource URL, and an array of payment options. Each option includes the asset contract address, human-readable USDC amount, atomic amount, recipient address (pay_to), payment scheme, network identifier (e.g. eip155:8453), network name (e.g. Base), USDC flag, and max timeout in seconds. Also returns an error string if decoding fails.

## 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": [
      "header"
     ],
     "properties": {
      "header": {
       "type": "string",
       "description": "Value of the PAYMENT-REQUIRED response header (base64 JSON)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "error": {
       "type": "string"
      },
      "options": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "asset": {
          "type": "string"
         },
         "amount": {
          "type": "string"
         },
         "pay_to": {
          "type": "string"
         },
         "scheme": {
          "type": "string"
         },
         "is_usdc": {
          "type": "boolean"
         },
         "network": {
          "type": "string"
         },
         "network_name": {
          "type": "string"
         },
         "amount_atomic": {
          "type": "string"
         },
         "max_timeout_seconds": {
          "type": "integer"
         }
        }
       }
      },
      "resource": {
       "type": "string"
      },
      "x402_version": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "error": "Payment required",
  "options": [
   {
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "0.001",
    "pay_to": "0xFe6Ae9ec9DE12817f23958F11b6CE69194b6Bd7E",
    "scheme": "exact",
    "is_usdc": true,
    "network": "eip155:8453",
    "network_name": "Base",
    "amount_atomic": "1000",
    "max_timeout_seconds": 300
   }
  ],
  "resource": "https://fastx402.tools/dns?name=example.com",
  "x402_version": 2
 }
}
```

## More

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