AirWallet Template: Paid API

This is a minimal Next.js app demonstrating x402 paid endpoints.

Endpoints

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