A recent audit of the live x402 ecosystem has exposed a significant gap between server-side functionality and client-side accessibility. While 36 out of 39 tested services correctly returned an HTTP 402 Payment Required status, only 7 of those 36 passed every check for proper discovery and header exposure. The most prevalent failure mode involves the PAYMENT-REQUIRED header being invisible to cross-origin JavaScript, effectively breaking the payment flow for browser-based agents and wallets.
The CORS Blind Spot
The core issue lies in how browsers handle cross-origin requests. For a browser to read the custom PAYMENT-REQUIRED header, the server must explicitly include it in the Access-Control-Expose-Headers list, alongside a valid Access-Control-Allow-Origin. The audit found that 20 of the 34 services that sent the header failed to make it readable. Specifically, 12 services omitted CORS headers entirely on the 402 response, while 6 sent Access-Control-Allow-Origin: * but forgot to expose the custom header. This means a browser receives the 402 status code but cannot parse the payment challenge, leaving the user or agent stuck.
Discovery and Versioning Chaos
Beyond CORS, the audit highlighted widespread inconsistencies in service discovery and protocol versioning. 13 of the 39 services lacked a valid /.well-known/x402 JSON file, with 3 returning HTML pages instead, which confuses automated indexers. Furthermore, 8 services exhibited mixed versioning behaviors, such as sending a v2 header paired with a v1 body, or including both 'amount' and 'maxAmountRequired' fields. While these inconsistencies didn't cause immediate overcharges in this snapshot, they create latent bugs that strict v2 clients might reject or v1 clients might misinterpret.
Builder Checklist for Compliance
To fix these issues, the report recommends that developers add PAYMENT-REQUIRED and PAYMENT-RESPONSE to their Access-Control-Expose-Headers and ensure CORS headers are present on the 402 response itself, not just during preflight. Additionally, services should return a JSON body that mirrors the header's challenge data rather than an empty object. Ensuring that discovery files like /.well-known/x402 are served as application/json and excluding them from single-page-app fallbacks is also critical for reliable indexing.
Key Takeaways
- 92.3% of tested services returned a live HTTP 402, but only 19.4% passed all compliance checks.
- 58.8% of services with live 402s failed to expose the PAYMENT-REQUIRED header to browsers via CORS.
- 33.3% of services lacked a valid JSON discovery file at /.well-known/x402.
- Mixed v1 and v2 protocol usage was found in 22.2% of the live challenges.
The Bottom Line
Shipping a 402 status is not enough; if the browser can't read the header, the payment flow is broken. Developers must prioritize CORS configuration for custom headers to make x402 viable for web-based agents.