{"uid":"cap_K7IvjlGmqZVbmqCcVspPd","slug":"x402-preflight-audit-8481fd04","name":"x402 Preflight Audit","description":"Launch diagnostics for x402 API developers. Check your endpoint's payment configuration, discovery metadata, and compatibility signals, with evidence and fix recommendations.","url":"https://x402.chikocorp.com/api/x402/preflight/audit?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["resource_url"],"properties":{"method":{"enum":["GET","HEAD"],"type":"string","default":"GET"},"resource_url":{"type":"string","pattern":"^https://","maxLength":1024,"description":"Public HTTPS x402 resource to inspect without payment credentials."},"max_price_usd":{"type":"number","maximum":1000000,"minimum":0},"expected_network":{"type":"string","pattern":"^[a-z0-9]+:[A-Za-z0-9._-]+$","maxLength":100}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["profile","decision","score","requestId","resource","payment","issues"],"properties":{"score":{"type":"integer","maximum":100,"minimum":0},"issues":{"type":"array"},"payment":{"type":"object"},"profile":{"enum":["audit"],"type":"string"},"decision":{"enum":["ALLOW","CAUTION","BLOCK","UNKNOWN"],"type":"string"},"resource":{"type":"object"},"requestId":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"cors":{"allowOrigin":"*","allowHeaders":["CONTENT-TYPE","PAYMENT-SIGNATURE"],"allowMethods":["POST","OPTIONS"],"exposeHeaders":["PAYMENT-REQUIRED","PAYMENT-RESPONSE"],"allowCredentials":null,"browserAgentCompatible":true},"score":100,"checks":[{"id":"payment.network_matches_policy","status":"PASS","evidence":"Published network is eip155:8453.","severity":"info"}],"issues":[],"payment":{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x820a7bf90d944bb26bfD9b62Ab172Fc3A0829cB9","bazaar":{"type":"http","found":true,"valid":true,"method":"POST","toolName":null,"description":null,"examplePresent":true,"inputSchemaPresent":true,"outputSchemaPresent":true},"scheme":"exact","network":"eip155:8453","detected":true,"priceUsd":0.05,"facilitator":"https://facilitator.world.fun","x402Version":2,"amountAtomic":"50000","challengeSource":"header","maxTimeoutSeconds":300},"profile":"audit","decision":"ALLOW","evidence":[{"id":"resource.response","source":"https://example.com/api/resource","observation":"HTTP 402 in 210 ms; 0 response bytes."}],"resource":{"url":"https://example.com/api/resource","method":"GET","finalUrl":"https://example.com/api/resource","latencyMs":210,"statusCode":402},"discovery":{"llmsTxt":{"url":"https://example.com/llms.txt","valid":true,"present":true,"consistent":true,"statusCode":200,"contentType":"text/plain"},"openapi":{"url":"https://example.com/openapi.json","valid":true,"present":true,"consistent":true,"statusCode":200,"contentType":"application/json"},"x402Metadata":{"url":"https://example.com/.well-known/x402.json","valid":true,"present":true,"consistent":true,"statusCode":200,"contentType":"application/json"},"agentMetadata":{"url":"https://example.com/.well-known/agent.json","valid":true,"present":true,"consistent":true,"statusCode":200,"contentType":"application/json"}},"expiresAt":"2026-08-06T00:15:00.000Z","requestId":"req_example1234","observedAt":"2026-08-06T00:00:00.000Z","operational":{"timeoutMs":8000,"contentType":"application/json","cacheControl":"private, no-store","redirectChain":[],"responseBytes":0},"claimBoundary":{"proves":["The listed signals were observed without sending payment credentials."],"doesNotProve":["That a future payment will settle or deliver the advertised result."]}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_TAgbOIJ-7wUgOsvTplrIg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Inspects and validates an x402 payment-gated endpoint before an autonomous agent commits USDC, returning a trust score, payment details, CORS compliance, and per-check results.","exampleAgentPrompt":"Before my agent pays, audit the x402 endpoint at https://example.com/api/resource using a GET request and flag anything suspicious — especially if the price or network looks wrong.","exampleUseCases":[{"title":"Pre-payment safety check for autonomous agent","prompt":"Before my agent calls https://api.example.com/data using GET, run a preflight audit on that x402 endpoint and tell me the trust score and whether it's safe to proceed."},{"title":"Verify network and asset before USDC spend","prompt":"Check the x402 endpoint at https://payments.example.com/report — I want to confirm it's on eip155:8453 and the price is under $1 before my agent sends any USDC."},{"title":"CORS compliance audit for browser-based agent","prompt":"Audit https://tools.example.com/generate as a POST x402 endpoint and tell me if it's browser-agent compatible — I need to know if the CORS headers will block my frontend agent."}],"resultDescription":"Returns a structured audit report including: an integer trust score (0–100), a decision (ALLOW or WARN/DENY), detailed per-check results with PASS/WARN/FAIL/UNKNOWN status and evidence, payment metadata (asset address, payTo, price in USD, network, facilitator, x402 version), CORS header analysis with browser-agent compatibility flag, discovery metadata (llms.txt, openapi.json, x402.json, agent.json presence and validity), observed and expiry timestamps, and a list of issues flagged during inspection.","failureModes":["Resource URL is not a valid HTTPS URL — returns validation error","Target endpoint is not an x402 resource (no 402 response) — returns FAIL checks","Network timeout reaching the target endpoint — returns UNKNOWN status checks","max_price_usd mismatch causes score penalty or WARN decision","expected_network mismatch between policy and observed network — FAIL check","Malformed or missing payment headers on target — FAIL on payment checks","CORS headers absent or misconfigured — browserAgentCompatible=false"],"whenToPreferThis":"Use this endpoint whenever an autonomous agent is about to call an unknown or untrusted x402-gated resource and needs to verify legitimacy, confirm price and network, check CORS compatibility, and get a trust score before committing funds. Prefer this over calling the x402 endpoint directly when you want a read-only, no-payment inspection pass.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-01T12:39:10.793Z","isFirstParty":false,"canonicalSlug":"x402-preflight-audit-8481fd04"}