{"uid":"cap_mEb5eBP70IakSqtFSDUKM","slug":"x402-response-header-shape-validator-480138ee","name":"X402 Response Header Shape Validator","description":"X402 Response Header Shape: X402 Response Header Shape checks a payment-response header for bounded base64 or JSON shape from bounded caller-supplied values without an external provider. Call X402 Response 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 Response Header Shape as version…","url":"https://api.delx.ai/api/v1/x402/x402-response-header-shape?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"header":{"type":"string","maxLength":8192,"description":"Header supplied to X402 Response 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-response-header-shape/v1","status":"pass","evidence":{"retained":false,"input_sha256":"568768ddc248cedc248ab1ccfdcc4bd01ee9005aa08eff63b5e7df553e7ff724","external_calls":0},"operation":"delivery_contract:x402_response_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_c51JgVFY9VPZrhoVQO7vS","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 an x402 payment-response header for correct base64 or JSON shape, returning acceptance/rejection status with mismatch reasons and normalized evidence","exampleAgentPrompt":"Before I accept this x402 payment response, can you check whether this header value passes the shape validation — it should be base64 or JSON and I want to know if it's accepted or rejected and why: 'eyJ0eXBlIjoicGF5bWVudCIsInZlcnNpb24iOiIxLjAifQ=='","exampleUseCases":[{"title":"Verify x402 header before paying","prompt":"I just got an x402 response header back from an agent service — can you run it through shape validation before I authorize payment? The header is: 'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbW91bnQiOiIxLjAwIn0.abc123'"},{"title":"Detect malformed agent delivery header","prompt":"This agent delivery came back with a response header I'm not sure about — can you check if it's a valid x402 shape and tell me the reasons if it gets rejected? Header value: 'eyJ0eXBlIjoiYWdlbnQiLCJzdGF0dXMiOiJjb21wbGV0ZSJ9'"},{"title":"Pre-acceptance header compliance check","prompt":"Before my system accepts this x402 challenge result, validate that the header has the right base64 or JSON shape and give me the normalized evidence and any mismatch reasons: 'eyJjaGFsbGVuZ2UiOiJhYmMiLCJyZXN1bHQiOiJwYXNzIn0='"}],"resultDescription":"Returns a structured validation result including: explicit acceptance or rejection status, contract-specific check outcomes, normalized evidence extracted from the header, and a list of mismatch reasons explaining any shape violations found in the base64 or JSON header value","failureModes":["Header exceeds 8192 character limit — request rejected","Header is neither valid base64 nor valid JSON — rejection with mismatch reason returned","Malformed input with unparseable structure — explicit rejection status with evidence","Empty or missing header field — validation fails with descriptive mismatch reason"],"whenToPreferThis":"Use this endpoint when you need a lightweight, no-external-dependency check of an x402 payment or agent delivery response header's structural shape before committing to payment or acceptance. Prefer this over full protocol validators when you only need shape/encoding compliance (base64 or JSON) and want explicit accept/reject status with mismatch reasons — especially useful in agent pipelines where caller-supplied headers must be validated in memory without retention or side effects.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T12:35:37.573Z","isFirstParty":false,"canonicalSlug":"x402-response-header-shape-validator-480138ee"}