{"uid":"cap_ocJ-J3uvdAIys5oADLKD2","slug":"x402-payment-header-shape-validator-da808270","name":"X402 Payment Header Shape Validator","description":"X402 Payment Header Shape: X402 Payment Header Shape checks a caller-supplied payment header for bounded base64 or JSON shape from bounded caller-supplied values without an external provider. Call X402 Payment Header Shape before paying for or accepting an x402 or agent delivery assembled from caller-supplied challenge and result metadata. Returns contract-specific checks, normalized evidence, mismatch reasons, and an explicit acceptance or rejection status for X402 Payment Header Shape as vers…","url":"https://api.delx.ai/api/v1/x402/x402-payment-header-shape?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"header":{"type":"string","maxLength":8192,"description":"Header supplied to X402 Payment Header Shape; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"encoding":"base64_json","shape_valid":true},"schema":"delx/util-x402-payment-header-shape/v1","status":"pass","evidence":{"retained":false,"input_sha256":"d2df40bf50f271956773fe4254a5de1a334515afca29fda6e60cd96f1ec08c63","external_calls":0},"operation":"delivery_contract:x402_payment_header_shape"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UxadCjQOCQodZn-oxNXp8","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates the shape and encoding of an x402 payment header, returning acceptance/rejection status, normalized evidence, and mismatch reasons.","exampleAgentPrompt":"Before I accept this incoming paid request, check that the x402 payment header is correctly shaped — it's a base64 string starting with 'eyJ...' — and tell me whether it passes or fails and why.","exampleUseCases":[{"title":"Pre-acceptance x402 header gate","prompt":"I'm about to fulfill a paid API request. Can you check this x402 payment header for me — here's the value: 'eyJwYXltZW50IjoidGVzdCJ9' — and tell me if the shape is valid or if there are any mismatches I should know about?"},{"title":"Agent delivery pipeline guard","prompt":"Before my agent delivers a result to the caller, I need to verify the x402 payment header they sent is properly formed. Here's the header string: 'eyJjaGFsbGVuZ2UiOiJhYmMiLCJyZXN1bHQiOiJ4eXoifQ=='. Does it pass shape validation?"},{"title":"Debugging a rejected payment header","prompt":"A client's payment keeps getting rejected and I'm not sure why. Can you run their x402 payment header through shape validation — the header value is 'eyJ0eXBlIjoieDQwMiIsInZlcnNpb24iOiIxIn0=' — and give me the specific mismatch reasons so I can debug it?"}],"resultDescription":"Returns contract-specific shape checks, normalized evidence extracted from the header, specific mismatch reasons if the header is malformed, and an explicit acceptance or rejection status indicating whether the x402 payment header is valid.","failureModes":["Header string exceeds 8192 character limit — returns an error or truncation rejection","Header is neither valid base64 nor valid JSON — returns rejection with encoding mismatch reason","Missing or empty header field — returns validation failure with missing-input reason","Header passes shape but fails contract-specific checks — returns rejection with detailed mismatch reasons"],"whenToPreferThis":"Use this endpoint when you need a fast, in-memory, offline shape check of an x402 payment header without calling any external payment provider. It is ideal as a pre-flight guard before accepting or fulfilling a paid request, especially in agentic pipelines where you need to reject malformed headers cheaply before committing to downstream work.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T01:49:35.622Z","isFirstParty":false,"canonicalSlug":"x402-payment-header-shape-validator-da808270"}