
Adds a demo route (/api/demo/402-flow) and an info endpoint to illustrate an HTTP 402 payment flow in-app. A first request (no X-Payment-Tx) returns a 402 JSON with payment.instructions, receiver, amount, and a demoTxHash; repeating the request with X-Payment-Tx: demo-payment-0x1234567890abcdef returns mock Aave yields data and paymentVerified: true. Includes a runnable helper script demo-402.sh that defaults to HTTPS, follows redirects, accepts an optional API_KEY env var (X-API-Key), and pretty-prints JSON when jq is available — use HOST and API_KEY to point at a deployed host. Intended for live demos and documentation to show the exact UX of requiring payment proof, how to present the 402 payload, and the transition to successful access. Note: ensure the backend API_KEY_SECRET matches the frontend VITE_API_KEY (or supply API_KEY when running the script).
24 Jan 2026