AirWallet Template: Paid API
This is a minimal Next.js app demonstrating x402 paid endpoints.
Endpoints
GET /api/health— Free health checkGET /api/paid/echo?q=hello— Paid echo (returns 402 without payment)
Testing
# Free endpoint curl http://localhost:3100/api/health # Paid endpoint (will return 402) curl http://localhost:3100/api/paid/echo?q=hello # Bypass for development curl -H "x-airwallet-bypass: true" \ http://localhost:3100/api/paid/echo?q=hello # Run buyer script (pays and fetches) pnpm buyer