{"uid":"cap_V6naatLorJSSCFmc2qcq_","slug":"x402-challenge-decoder-72761973","name":"x402 Challenge Decoder","description":"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.","url":"https://api.zfinia.com/x402/v1/x402-challenge-decode?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Jai9F0DV1V6EO31Nfb47W","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Inspect payment options before authorizing","prompt":"I just got a 402 response from an API I want to call. Here's the raw JSON body — decode it and tell me all the accepted payment options, including the network, asset, amount, and payTo address for each one."},{"title":"Debug a malformed x402 challenge","prompt":"Something looks off with this x402 payment-required payload — can you decode it and tell me if there are any warnings like a bad amount, invalid payTo address, or unrecognised network?"},{"title":"Validate an x402 header before agent payment flow","prompt":"My agent received this base64-encoded payment-required header from a vendor endpoint. Decode it for me and confirm whether it's well-formed, what version it is, and what the declared Bazaar schemas are."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T06:43:29.741Z","isFirstParty":false,"canonicalSlug":"x402-challenge-decoder-72761973"}