{"uid":"cap_ILydrSVr7K5s0_0LWeZS9","slug":"10x402-x402-envelope-linter-0f91c077","name":"10x402 x402 Envelope Linter","description":"Check a captured x402 402 for indexing and payment blockers — no fetch","url":"https://10x402.com/lint/envelope","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"string","maxLength":262144,"description":"a JSON object: { \"status\": 402, \"headers\": { \"payment-required\": \"…\", … }, \"body\": \"…\" }, up to 256 KB"},"type":{"type":"string","const":"http"},"method":{"type":"string","const":"POST"},"bodyType":{"type":"string","const":"text"}},"additionalProperties":false},"output":{"type":"object","required":["type","format"],"properties":{"type":{"type":"string","const":"text"},"format":{"type":"string","const":"application/json","description":"a JSON lint report: grade, summary, findings[] and checks_run"},"example":{"type":"string","description":"the sample request body above, actually run through this endpoint — or, when that run is larger than a response header should carry, an object naming its size and the free URL it is published at in full"}},"additionalProperties":false}}},"responseSchema":{"type":"text","format":"application/json","example":"{\"grade\":\"A\",\"summary\":{\"versions_detected\":[1],\"payTo\":\"0x0000000000000000000000000000000000000001\",\"network\":\"base\",\"price\":\"$0.001 (1000 atomic)\",\"bazaar_ready\":\"n/a\",\"blockers\":[\"V2_HEADER_PRESENT\"]},\"findings\":[{\"severity\":\"error\",\"code\":\"V2_HEADER_PRESENT\",\"message\":\"no PAYMENT-REQUIRED response header — this endpoint publishes no x402 v2 envelope.\",\"fix\":\"Add a PAYMENT-REQUIRED response header to the 402 carrying the standard-base64 JSON v2 envelope. This costs you DISCOVERY rather than payment, and the distinction is worth being precise about: @x402/core reads the header first but DOES fall back to a v1 body when there is none, so the current client generation can still pay you. What it cannot do is find you — CDP marks the PAYMENT-REQUIRED header a required indexing check, so a v1-only 402 is not catalogued at all, and a strictly-v2 client cannot pay it either. Keep the v1 body exactly as it is; the two versions share a 402 without either noticing the other.\",\"core\":false}],\"checks_run\":28}"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","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.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VGjY0Eu_9PQIS4bDlGCgW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Lints a raw HTTP 402 response envelope for x402 compliance issues that prevent indexing or discovery in Bazaar, and provides a fix for each finding.","exampleAgentPrompt":"My x402 service passes validation but still isn't showing up in Bazaar — can you lint this 402 response envelope and tell me what's blocking it and how to fix each issue? Here's the raw response: {\"status\": 402, \"headers\": {\"payment-required\": \"...\"}, \"body\": \"...\"}","exampleUseCases":[{"title":"Debugging Bazaar indexing failure","prompt":"My x402 endpoint passes validate but it's not appearing in Bazaar at all — can you run this 402 response through the envelope linter and tell me every blocker and how to fix it? The response is: {\"status\":402,\"headers\":{},\"body\":\"{\\\"version\\\":1,...}\"}"},{"title":"Checking v1 vs v2 header compliance","prompt":"I think my 402 response might be missing the PAYMENT-REQUIRED header required for v2 indexing. Can you lint this envelope and tell me if I need to add it, and what exactly to put there? Response: {\"status\":402,\"headers\":{\"x-payment\":\"...\"},\"body\":\"...\"}"},{"title":"Pre-launch x402 compliance audit","prompt":"Before I list my new x402 service publicly, can you check this 402 response envelope for any compliance issues that would stop it from being discovered or paid by strict v2 clients? Give me a grade and all the fixes: {\"status\":402,\"headers\":{\"payment-required\":\"...\"},\"body\":\"...\"}"}],"resultDescription":"Returns a JSON lint report containing a letter grade (e.g. 'A'), a summary with detected versions, payTo address, network, price, bazaar_ready status, and a list of blockers; plus a findings array where each finding has a severity, error code, human-readable message, and a detailed fix recommendation; and a total checks_run count.","failureModes":["Input body exceeds 256 KB limit — request rejected","Malformed JSON in the 402 response body field — parse error returned","Missing required fields (type, method, bodyType, body) — validation error","Non-HTTP type or non-POST method submitted — schema constraint violation","Service unavailable — HTTP 5xx with no lint report"],"whenToPreferThis":"Use this endpoint specifically when an x402 service passes basic validation but fails to appear in Bazaar or is not indexed by discovery infrastructure. It is purpose-built for diagnosing response-level x402 envelope issues (v1 vs v2, missing headers, malformed envelopes) rather than general HTTP debugging or payment execution. Prefer this over generic HTTP linters when the issue involves x402 protocol compliance, CDP indexing requirements, or Bazaar discoverability.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:38:40.074Z","isFirstParty":false}