ToolAssay

Decode an x402 payment challenge before paying

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.

Answeringour last check, 2026-10-02
1 of 1checks answered this week
2256 msmedian answer time
$0.002listed price per call
$0.002price it asked us

Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.

Endpoint

POST https://api.zfinia.com/x402/v1/x402-challenge-decode

CategoryEverything else
Provider hostapi.zfinia.com
Networkseip155:8453
Payment schemesexact
Self-reported calls, 30 days1 from 1 payers (the provider's figure, not ours)

Our checks, last 30 days

DayResultHTTPAskedTime
2026-10-02 valid payment request 402$0.002 2256 ms

Example input (from the provider)

{
  "body": {
    "payload": {
      "accepts": [
        {
          "amount": "2000",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "network": "eip155:8453",
          "payTo": "0x25e8245f07d5e4873987293dad666afbe56a9608",
          "scheme": "exact"
        }
      ],
      "x402Version": 2
    }
  },
  "bodyType": "json",
  "method": "POST",
  "type": "http"
}

Promised output schema (from the provider)

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "properties": {
            "payload": {
              "description": "An x402 payment-required payload: the parsed JSON object, the raw JSON string, or the base64 value of a payment-required header.",
              "oneOf": [
                {
                  "type": "object"
                },
                {
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                }
              ]
            }
          },
          "required": [
            "payload"
          ],
          "type": "object"
        },
        "bodyType": {
          "enum": [
            "json",
            "form-data",
            "text"
          ],
          "type": "string"
        },
        "method": {
          "enum": [
            "POST"
          ],
          "type": "string"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method",
        "bodyType",
        "body"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "additionalProperties": false,
          "properties": {
            "accepts": {
              "description": "Accepted payments, normalised. At most 20 are returned.",
              "items": {
                "additionalProperties": false,
                "properties": {
                  "amount": {
                    "description": "Price in atomic units of the asset, as declared.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "asset": {
                    "description": "Asset contract address as declared.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "network": {
                    "description": "CAIP-2 network identifier as declared, e.g. \"eip155:8453\".",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "pay_to": {
                    "description": "Recipient address as declared.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scheme": {
                    "description": "Payment scheme as declared, e.g. \"exact\".",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "scheme",
                  "network",
                  "asset",
                  "amount",
                  "pay_to"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "declared_input": {
              "description": "Input schema declared under extensions.bazaar.schema.properties.input, or null."
            },
            "declared_output": {
              "description": "Output schema declared under extensions.bazaar.schema.properties.output, or null."
            },
            "payment_sent": {
              "const": false,
              "description": "Always false. This service never pays anything."
            },
            "request_id": {
              "description": "Delivery request identifier; also returned in x-foundry-request-id.",
              "type": "string"
            },
            "resource": {
              "description": "Declared resource, verbatim, or null."
            },
            "service_id": {
              "description": "Canonical service identifier.",
              "type": "string"
            },
            "service_version": {
              "description": "Version of the invoked service.",
              "type": "string"
            },
            "version": {
              "description": "Declared x402Version, or null when absent or not a number.",
              "type": [
                "integer",
                "null"
              ]
            },
            "warnings": {
              "description": "Deduplicated warning codes describing what is wrong with the challenge.",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "request_id",
            "service_id",
            "service_version",
            "version",
            "resource",
            "accepts",
            "warnings",
            "declared_input",
            "declared_output",
            "payment_sent"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}

This page as JSON