{"openapi":"3.1.0","info":{"title":"x402 Test Endpoint","version":"0.2.0","description":"Public x402 test endpoints for payment clients, and a checker for your own x402 endpoint. Free, no authentication."},"servers":[{"url":"https://x402testendpoint.com"}],"paths":{"/t/{scenario}":{"get":{"operationId":"runScenario","summary":"Request an x402 payment test scenario","description":"Answers 402 with an x402 v2 quote. Retry with a PAYMENT-SIGNATURE header to pay. See /scenarios.json for what each scenario does.","parameters":[{"name":"scenario","in":"path","required":true,"schema":{"type":"string","enum":["ok","choose","slow","overpriced","price-bump","wrong-network","malformed","missing-fields","always-402"]}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"type":"string"},"description":"Base64 x402 v2 payment payload."}],"responses":{"200":{"description":"Payment settled; the scenario passed."},"400":{"description":"A payment was sent to a trap scenario. Nothing was settled."},"402":{"description":"Payment required. The quote is in the PAYMENT-REQUIRED header."},"404":{"description":"Unknown scenario."}}}},"/api/check":{"get":{"operationId":"checkEndpoint","summary":"Check whether an agent can pay at an x402 endpoint","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"Public http(s) URL on a default port."}],"responses":{"200":{"description":"Report with verdict, protocols, prices and findings."},"400":{"description":"The URL was missing or not allowed."}}}},"/api/audit":{"get":{"operationId":"auditEndpoint","summary":"Paid audit of an x402 endpoint","description":"Costs $0.02 per call, paid over x402. Returns 402 with a quote; retry with a PAYMENT-SIGNATURE header. Adds on-chain token checks, facilitator support and quote stability to the free check.","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"Audit report."},"400":{"description":"The URL was missing or not allowed. No payment is requested."},"402":{"description":"Payment required."}}}},"/api/errors":{"get":{"operationId":"explainError","summary":"Explain an x402 error code or client message","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Error code or message. Omit to list every entry."}],"responses":{"200":{"description":"The matching entry, or all entries."},"404":{"description":"No entry matches."}}}},"/api/decode":{"get":{"operationId":"decodeHeader","summary":"Decode an x402 version 2 header value","parameters":[{"name":"value","in":"query","required":true,"schema":{"type":"string"},"description":"Base64 value of PAYMENT-REQUIRED, PAYMENT-SIGNATURE or PAYMENT-RESPONSE."}],"responses":{"200":{"description":"Header kind, decoded JSON and notes."},"400":{"description":"The value is not base64 JSON."}}}},"/scenarios.json":{"get":{"operationId":"listScenarios","summary":"List all test scenarios","responses":{"200":{"description":"Array of scenarios."}}}}}}