{"uid":"cap_VnCfEFxGxUIbVWOTqlr-G","slug":"x402-dev-tools-payment-header-decoder-b22d2385","name":"x402 Dev Tools – Payment Header Decoder","description":"Decodes a PAYMENT-REQUIRED, PAYMENT-SIGNATURE or PAYMENT-RESPONSE header (x402 v2, or X-PAYMENT / X-PAYMENT-RESPONSE of v1), base64 or JSON, detecting which it is. Explains it in plain terms (price in dollars, network, payer and payee, validity window, explorer link) and lists problems: wrong USDC EIP-712 domain, expired or not-yet-valid authorizations, amount or payee mismatches, missing Bazaar extension.","url":"https://dev.kagurazaka.dev/v1/decode?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"kind":{"enum":["payment-required","payment-signature","payment-response","auto"],"type":"string","description":"default auto"},"header":{"type":"string","description":"the header value (base64 or JSON); a leading 'Header-Name:' is ignored"}}},"responseSchema":{"type":"json","example":{"kind":"payment-required","accepts":[{"pay_to":"0xe6f7508ab572a4dc9c7486ea017b100d83f3c3f8","scheme":"exact","network":"eip155:8453","price_usd":0.001,"network_name":"Base"}],"decoded":{"x402Version":2},"summary":"Pay $0.001 on Base for https://api.example.com/v1/weather","findings":[{"level":"info","message":"no bazaar extension: the CDP Bazaar lists the resource only with it (declareDiscoveryExtension)"}],"x402_version":2}},"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_2kjf6MpVELV1xiCbsdlAx","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 and explains x402 payment headers (PAYMENT-REQUIRED, PAYMENT-SIGNATURE, or PAYMENT-RESPONSE) in plain English, flagging validation issues like expired authorizations, wrong domains, or missing Bazaar extensions.","exampleAgentPrompt":"Can you decode this x402 payment-required header for me and tell me if there are any problems with it — what's the price, which network, who gets paid, and is anything expired or misconfigured? Here's the header value: eyJ4NDAyVmVyc2lvbiI6Mn0=","exampleUseCases":[{"title":"Debug failing x402 payment header","prompt":"I'm getting a payment-required header back from an x402 API and my client keeps failing — can you decode this header value and tell me what's wrong with it, like if the domain is off or the amount doesn't match? Header: eyJ4NDAyVmVyc2lvbiI6Mn0="},{"title":"Inspect x402 payment signature before submitting","prompt":"Before I send this payment signature to the facilitator, can you decode it and confirm the payer address, payee, amount in dollars, and whether the authorization window is still valid? Here's the header: eyJzaWduYXR1cmUiOiIweGFiYyJ9"},{"title":"Check Bazaar extension compliance","prompt":"I built an x402 API and want to list it on the CDP Bazaar — can you decode my payment-required header and tell me if the Bazaar extension is present and if there are any other compliance issues? Header value: eyJ4NDAyVmVyc2lvbiI6Mn0="}],"resultDescription":"Returns the decoded header type (payment-required, payment-signature, or payment-response), a plain-English summary (price in USD, network, payer/payee addresses, validity window, explorer link), a structured decoded object, and a list of findings with severity levels (info, warning, error) flagging issues such as wrong EIP-712 USDC domain, expired or not-yet-valid authorizations, amount or payee mismatches, and missing Bazaar discovery extension.","failureModes":["Invalid or malformed base64 input — returns parse error","Unknown header kind when auto-detection fails — returns ambiguous kind error","Header value is empty or missing — returns validation error","JSON header with missing required fields — returns incomplete header error","Network not recognized — returns unknown network finding"],"whenToPreferThis":"Use this endpoint when you need to inspect, debug, or validate any x402 protocol payment header — whether you're a developer building an x402 client or server, an agent troubleshooting payment failures, or a seller verifying Bazaar compliance. It handles all three header types (payment-required, payment-signature, payment-response) for both x402 v1 and v2, and automatically detects the type if unknown. Prefer it over manual base64 decoding or generic JSON parsers because it applies x402-specific validation rules (EIP-712 domains, USDC contract addresses, authorization windows, Bazaar extensions) and returns human-readable findings.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T12:31:44.581Z","isFirstParty":false,"canonicalSlug":"x402-dev-tools-payment-header-decoder-b22d2385"}