{"uid":"cap_6hyaIZlYGUPYaZ6dAAGQM","slug":"beggar-bot-payment-header-validator-7a5972f7","name":"Beggar Bot Payment Header Validator","description":"Decode an x402 X-PAYMENT / PAYMENT-SIGNATURE header, recover the EIP-3009 signer and match it against 402 requirements; explains facilitator rejections. Pure compute.","url":"https://beggar-bot-demand.beggarbot.workers.dev/v1/paymentheader?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"now":{"type":"number","description":"optional unix seconds"},"header":{"type":"string","description":"base64 X-PAYMENT or PAYMENT-SIGNATURE value"},"requirements":{"type":"object","description":"402 body / PAYMENT-REQUIRED header / accepts[]"}}},"responseSchema":{"type":"json"},"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_QLxyvKTPF0kDIQnT7wASz","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":"Parses and validates an x402 payment header (X-PAYMENT or PAYMENT-SIGNATURE) against a set of payment requirements, returning structured validation results","exampleAgentPrompt":"Check whether this base64 payment header is valid against these payment requirements — the header is 'eyJhbGci...' and the requirements say payTo 0x719227f384b66BFEF00093D6d8d32fA9dC2B40e7, maxAmountRequired 1000000 USDC on Base mainnet.","exampleUseCases":[{"title":"Validate incoming agent payment before serving content","prompt":"I received an X-PAYMENT header from a client agent and need to check if it satisfies my payment requirements before I unlock the paid response — the header value is 'eyJhbGciOiJFUzI1NiJ9...' and I require payment to 0x719227f384b66BFEF00093D6d8d32fA9dC2B40e7 for at least 0.01 USDC on Base mainnet."},{"title":"Debug a rejected x402 payment header","prompt":"My agent's payment header keeps getting rejected by a 402-gated API — can you parse this base64 PAYMENT-SIGNATURE value 'eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9...' and tell me what's wrong with it compared to the server's requirement that expects USDC on Base mainnet?"},{"title":"Pre-flight check before submitting x402 payment","prompt":"Before my agent submits this payment header to a paid endpoint, can you verify it's correctly formed and matches the requirements in this 402 response body — the header is 'eyJwYXltZW50IjoiMHgxMjMifQ==' and the current unix time is 1718000000?"}],"resultDescription":"A JSON object indicating whether the payment header is valid, decoded header fields (payer, payee, amount, asset, chain, expiry, signature), and whether it satisfies the provided requirements (amount, payTo address, network, asset contract). May include error messages or field-level validation failures.","failureModes":["Malformed or non-base64 header returns a parse error","Header expired relative to provided or server-side timestamp","Amount or payTo address does not match requirements","Unsupported network or asset contract in header","Missing required fields in the requirements object","Invalid signature on the payment header"],"whenToPreferThis":"Use this endpoint when you need to locally validate or debug an x402 payment header before or after submitting it to a paid API — especially when building 402-gated services on Base mainnet with USDC. Prefer this over /v1/verify when you only need client-side header parsing without on-chain or receipt confirmation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-24T12:43:33.492Z","isFirstParty":false,"canonicalSlug":"beggar-bot-payment-header-validator-7a5972f7"}