Request
{
"body": {
"body": "{\"x402Version\":1,\"accepts\":[{\"scheme\":\"exact\",\"network\":\"base\",\"maxAmountRequired\":\"1000\",\"resource\":\"https://example.com/api/thing\",\"description\":\"an example paid endpoint\",\"mimeType\":\"application/json\",\"payTo\":\"0x0000000000000000000000000000000000000001\",\"maxTimeoutSeconds\":60,\"asset\":\"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\"extra\":{\"name\":\"USD Coin\",\"version\":\"2\"},\"outputSchema\":{\"input\":{\"type\":\"http\",\"method\":\"POST\",\"discoverable\":true,\"bodyType\":\"text\",\"description\":\"the request body\"},\"output\":{\"type\":\"string\",\"description\":\"the response body\"}}}]}",
"check": "V2_HEADER_PRESENT",
"headers": {
"content-type": "application/json"
},
"status": 402
},
"bodyType": "json",
"method": "POST",
"type": "http"
}
Response
{
"example": "{\"check\":\"V2_HEADER_PRESENT\",\"applied\":true,\"passed\":false,\"finding\":{\"severity\":\"error\",\"code\":\"V2_HEADER_PRESENT\",\"message\":\"no PAYMENT-REQUIRED response header \u2014 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 \u2014 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,\"sources\":[{\"kind\":\"spec\",\"ref\":\"specs/transports-v2/http.md:7-25 \u00a7 Payment Required Signaling\"},{\"kind\":\"cdp-validator\",\"ref\":\"cdp-validator-toolshed.json preflight[6] payment_required_header (required)\"},{\"kind\":\"client-code\",\"ref\":\"@x402/core@2.23.0 dist/cjs/http/index.js:1620-1628 \u2014 the v2 client DOES fall back to a v1 body\"},{\"kind\":\"field-report\",\"ref\":\"x402-foundation/x402#3091 \u2014 x402-fetch@1.x is still a live buyer population\"}]},\"regime\":\"bazaar\",\"severity\":\"error\",\"core\":false,\"sources\":[{\"kind\":\"spec\",\"ref\":\"specs/transports-v2/http.md:7-25 \u00a7 Payment Required Signaling\"},{\"kind\":\"cdp-validator\",\"ref\":\"cdp-validator-toolshed.json preflight[6] payment_required_header (required)\"},{\"kind\":\"client-code\",\"ref\":\"@x402/core@2.23.0 dist/cjs/http/index.js:1620-1628 \u2014 the v2 client DOES fall back to a v1 body\"},{\"kind\":\"field-report\",\"ref\":\"x402-foundation/x402#3091 \u2014 x402-fetch@1.x is still a live buyer population\"}],\"summary\":{\"versions_detected\":[1],\"payTo\":\"0x0000000000000000000000000000000000000001\",\"network\":\"base\",\"price\":\"$0.001 (1000 atomic)\"},\"checks_run\":1}",
"format": "application/json",
"type": "text"
}