@three-ws/x402-modal

A drop-in payment modal for any x402 paid endpoint. Two ways to wire it, both below.

1 — Declarative (data-x402-*)

The button below is bound automatically by the global script. Point data-x402-endpoint at your own x402 route to try it live.

result will appear here…

2 — Programmatic (pay())

Call pay() from your own handler and await the result.

result will appear here…

This page loads the local build at ../dist/x402.global.js. Run npm run build in the package root first, then serve this folder (e.g. npx serve) and open it. The demo endpoint is a placeholder — point it at your own x402 route to try it live.