# x402 Challenge Decoder

> x402 Challenge Decoder is a paid API for AI agents from api.zfinia.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-18).

Decodes a raw x402 402-payment-required challenge into its structured components — version, resource, and all accepted payment options — without making any network call or sending payment.

## Facts

- Endpoint: POST https://api.zfinia.com/x402/v1/x402-challenge-decode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-challenge-decoder-72761973
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V6naatLorJSSCFmc2qcq_

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-challenge-decoder-72761973 -d '<json body>'
```

Example prompt: Before we pay anything, decode this x402 payment-required payload for me and tell me what networks and assets it accepts, how much it costs, and where the payment goes — flag any issues you see with it.

## When to prefer this

Use this endpoint when an AI agent or developer needs to inspect or validate an x402 payment-required response before deciding whether to pay — especially when debugging malformed challenges, auditing accepted payment options, or building agent workflows that must verify payment parameters before committing funds. Prefer this over manual JSON parsing because it normalizes all payment options, names specific validation issues, and extracts Bazaar schemas in a single offline call with no network side effects.

## Known failure modes

- Invalid or unparseable payload returns a parse error
- Base64 input that does not decode to valid JSON returns a format error
- Missing required fields in the x402 payload trigger named warnings rather than hard errors
- Payload exceeding 16,384 characters is rejected
- Empty or null payload input is rejected with a missing-input error

## How this service works

Decode an x402 payment challenge before paying: give it the raw 402 body or payment-required header, as JSON or base64, and get back the version, resource, and every accepted payment normalised to scheme, network, asset, amount and payTo. Names what is wrong with named warnings — bad amount, unrecognised network, invalid payTo, unsupported scheme, missing input or output schema — and returns the declared Bazaar schemas. No network call, no payment sent.

## Output

Returns the decoded x402 challenge as structured data: the protocol version, the resource being gated, and a normalized list of accepted payment options each with scheme, network, asset, amount, and payTo address. Also includes named validation warnings (bad amount, unrecognised network, invalid payTo, unsupported scheme, missing input/output schema) and the declared Bazaar schemas. No payment is sent and no network calls are made.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "payload": {
   "oneOf": [
    {
     "type": "object"
    },
    {
     "type": "string",
     "maxLength": 16384,
     "minLength": 1
    }
   ],
   "description": "An x402 payment-required payload: the parsed JSON object, the raw JSON string, or the base64 value of a payment-required header."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-challenge-decoder-72761973/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.zfinia.com](https://www.zero.xyz/host/api.zfinia.com/llms.txt)
