{"uid":"cap_E_MkcBmrRgI6l9L6iL6d2","slug":"aiskills402-x402-payment-header-check-146c1fe0","name":"AISkills402: x402 Payment Header Check","description":"Payment Header Check API: reads an x402 PAYMENT-SIGNATURE header before you send it - base64/UTF-8/JSON, version, authorization fields, clock window, who signed (lane a or b) and, with the seller PAYMENT-REQUIRED, payTo/amount/network/asset. Nothing is sent anywhere. $0.005 USDC per check. POST JSON {payment_signature, payment_required?}; free example at https://api.aiskills402.com/v1/run/payment-header-check/example","url":"https://api.aiskills402.com/v1/run/payment-header-check?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"payment_required":{"type":["string","null"],"maxLength":16384,"description":"Optional: the seller PAYMENT-REQUIRED header value, for a cross-check of payTo, amount, network and asset."},"payment_signature":{"type":"string","maxLength":16384,"minLength":1,"description":"The value of the PAYMENT-SIGNATURE (or X-PAYMENT) header you are about to send. It is only read here, never sent anywhere."}}},"responseSchema":{"type":"json","example":{"ok":true,"skill":"payment-header-check","engine":"1.0.0","replay":false,"result":{"clock":{"now":1792152000,"state":"valid","skew_seconds":120,"state_with_skew":"valid","seconds_until_valid":0,"seconds_until_expiry":6609600},"scheme":"exact","network":"eip155:8453","decoding":{"json":true,"utf8":true,"base64":"standard","non_ascii":false},"findings":[{"code":"expiry_window_long","detail":"the authorization stays valid for another 6609600 seconds; a long window is replay exposure if the header leaks","severity":"info"}],"signature":{"lane":"a","bytes":65,"recovered":"0xa696565cfe3f65cdd0132a02e408c39418d8ce47","domain_used":{"name":"USD Coin","chainId":8453,"version":"2","verifyingContract":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"}},"x402_version":2,"authorization":{"to":"0x0000000000000000000000000000000000000000","from":"0xa696565cFe3f65cdD0132a02e408C39418D8cE47","nonce":"0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e","valid_after":0,"value_micro":"1","valid_before":1798761600},"vs_requirements":null},"receipt":{"tx":"0x<settlement transaction>","settled":true},"refusal":null,"input_sha256":"<sha256 of the request>"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pnm7Xg1SloubCQIHjbW1a","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses and validates an x402 PAYMENT-SIGNATURE header value — decoding, version, authorization fields, clock window, signer lane, and optional cross-check against a PAYMENT-REQUIRED header — without transmitting it anywhere.","exampleAgentPrompt":"Before I send this payment request, can you check my x402 PAYMENT-SIGNATURE header value and tell me if it's correctly structured, what the clock window looks like, and whether there's any replay risk?","exampleUseCases":[{"title":"Pre-flight payment header debug","prompt":"I'm building an x402 client and my payment keeps getting rejected — can you decode and validate this PAYMENT-SIGNATURE header value for me and tell me what's wrong with the authorization fields or clock window?"},{"title":"Cross-check signature against requirements","prompt":"I have both the seller's PAYMENT-REQUIRED header and the PAYMENT-SIGNATURE I'm about to send — can you check whether my signature matches the payTo address, amount, network, and asset in the requirement?"},{"title":"Audit signer lane and replay exposure","prompt":"Can you inspect this x402 PAYMENT-SIGNATURE and tell me which lane signed it, what address was recovered, and whether the validity window is dangerously long from a replay-attack perspective?"}],"resultDescription":"A JSON object indicating whether the header is valid, including: base64/UTF-8/JSON decoding results, x402 version, scheme, network, authorization fields (to, from, nonce, valid_after, valid_before, value_micro), clock state and skew, recovered signer address and lane (a or b), any findings with severity (e.g. long expiry window), and an optional cross-check against PAYMENT-REQUIRED fields (payTo, amount, network, asset).","failureModes":["Invalid or non-base64 payment_signature returns decoding errors with ok:false","Missing required payment_signature field returns a 400-level error","Malformed JSON inside the decoded header returns a parsing error","Clock skew or expired authorization detected and reported in findings","Signature recovery failure returns a null or invalid recovered address","Payment not settled (insufficient USDC balance) returns a 402 before processing"],"whenToPreferThis":"Use this endpoint when you need to validate or debug an x402 PAYMENT-SIGNATURE header before sending it, or when you want to cross-check it against a PAYMENT-REQUIRED header. It is the right choice for x402-protocol-specific header inspection, signer recovery, and clock/replay analysis. Prefer it over generic JWT or HTTP header validators when the header is specifically an x402 EIP-712 signed transfer authorization.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:38:53.327Z","isFirstParty":false,"canonicalSlug":"aiskills402-x402-payment-header-check-146c1fe0"}