{"uid":"cap_Pr0RGgcKvhELeYFxA4QUh","slug":"x402-invoice-decode-validator-e0bcb7b9","name":"x402 Invoice Decode & Validator","description":"Use before paying any x402 invoice: decodes a base64 PAYMENT-REQUIRED header (query ?header= or JSON body {header}) and checks scheme exact, Base mainnet, Base USDC asset, payTo (EOA/contract/EIP-7702), human amount, timeout; returns verdict ok/warn/fail with reasons. Errors: 400 invalid header. Read-only; never signs or pays.","url":"https://x402-research-iota.vercel.app/api/x402/invoice-decode?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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":"base64 PAYMENT-REQUIRED header value"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"signed":{"type":"boolean"},"accepts":{"type":"array","items":{"type":"object"}},"reasons":{"type":"array","items":{"type":"string"}},"verdict":{"enum":["ok","warn","fail"],"type":"string"},"resource":{"type":"object"},"x402Version":{"type":"number"}}}}}}},"responseSchema":{"type":"json","example":{"signed":false,"accepts":[{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":{"kind":"eoa","address":"0xa26f...8147"},"amount":"100000","checks":[{"check":"scheme","level":"ok","detail":"scheme=exact"}],"scheme":"exact","network":"eip155:8453","verdict":"ok","amountUsdc":0.1,"maxTimeoutSeconds":300}],"reasons":[],"verdict":"ok","resource":{"url":"https://x402-research-iota.vercel.app/api/firm/risk-snapshot"},"x402Version":2}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_1cn5V599l9P-jQiAqGvEP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Decodes and validates a base64-encoded x402 PAYMENT-REQUIRED header, returning a structured analysis of payment requirements including asset, network, amount, scheme, and overall verdict.","exampleAgentPrompt":"Can you decode this x402 PAYMENT-REQUIRED header for me and tell me whether it's valid, what network it's on, how much USDC it's asking for, and what address to pay? Here's the base64 value: eyJ4NDAyVmVyc2lvbiI6Mi4uLn0=","exampleUseCases":[{"title":"Debug a failing x402 payment flow","prompt":"I'm getting a 402 response from an API and my payment isn't going through — can you decode the PAYMENT-REQUIRED header and tell me if it's valid, what the verdict is, and which address and amount it expects? The base64 header is eyJ4NDAyVmVyc2lvbiI6Mn0="},{"title":"Verify x402 header before paying","prompt":"Before I send any USDC, decode this x402 invoice header and confirm it's legitimate — check the verdict, the network, and that the amount is reasonable. Header: eyJhY2NlcHRzIjpbXX0="},{"title":"Inspect payment requirements of an x402 API","prompt":"I want to integrate with an x402-gated API endpoint — can you parse the base64 payment header it returned and break down the asset, payTo address, scheme, timeout, and overall ok/warn/fail verdict for me? Header value is eyJ4NDAyVmVyc2lvbiI6Mn0="}],"resultDescription":"Returns a JSON object with the decoded x402 payment details: a top-level verdict (ok/warn/fail), an array of accepted payment options (each with asset contract address, payTo EOA address, amount, amount in USDC, network chain ID, scheme, max timeout, and per-check results), a reasons array for any warnings or failures, the resource URL the payment unlocks, and the x402 protocol version.","failureModes":["Missing or malformed 'header' query parameter returns an error or empty result","Invalid base64 input causes a decode failure","Well-formed base64 but non-x402 payload produces a fail verdict","Network issues to the decoder service return a 5xx error","Unsupported x402 version may return a warn or fail verdict"],"whenToPreferThis":"Use this endpoint when you need to programmatically inspect or validate an x402 PAYMENT-REQUIRED header before deciding whether to proceed with payment — especially useful for debugging integration issues, auditing payment requirements, or building x402-aware agent pipelines that need to parse payment terms without making the actual payment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T07:03:26.413Z","isFirstParty":false,"canonicalSlug":"x402-invoice-decode-validator-e0bcb7b9"}