15-minute quickstart
Goal: one provider, one service, and an L402-paid endpoint. Use either ZapAds hosted gateway or your own zapads-proxy.
0. Prerequisites (~2 min)
- Supabase project (or local
supabase start). - A Lightning wallet for verification (e.g. Blink on mainnet for real
lnbcinvoices). - Node + pnpm if you run the web app locally.
1. Environment (~3 min)
- Copy
apps/web/.env.example→apps/web/.env.localand fillNEXT_PUBLIC_SUPABASE_*,SUPABASE_SERVICE_ROLE_KEY, and Lightning-related vars for your stack. - For the proxy, see
apps/proxy/README.md— you will setregistry_url, provider key, and Lightning backend (Blink or LNbits).
2. Provider row (~2 min)
- Sign up on the web app; complete the Welcome flow to create a provider row and mint your API key.
- Under Settings → Lightning address, add and verify a Lightning address (LNURL-pay).
3. Create a service (~3 min)
- In Dashboard → Services, click New service.
- Choose Host through ZapAds if you want ZapAds to run the paid gateway; paste your backend URL and save. ZapAds generates the public endpoint.
- Choose I run zapads-proxy if you want full control; enter your public proxy endpoint and note the install command.
4. If self-hosting, run zapads-proxy (~5 min)
- Download or build zapads-proxy from the monorepo
apps/proxy(or use the one-line installer — see Install). - Point
config.yamlat your upstream, yourZAPADS_PROVIDER_KEY, and the log-invocation URL as documented. - Start the proxy and hit a priced route without payment — expect 402 with
WWW-Authenticateand a BOLT11 invoice. - Pay the invoice; retry with
Authorization: L402 <macaroon>:<preimage>— the upstream should return 2xx.
If you chose Host through ZapAds, skip this step and test the generated endpoint from the service detail page instead.
Verify
# Unpaid — expect 402
curl -i https://your-proxy.example.com/hello
# After paying the invoice from step 4:
curl -i -H "Authorization: L402 <macaroon>:<preimage>" \
https://your-proxy.example.com/helloNext
- Read L402 and For agents.
- Browse public discovery:
GET /api/v1/services.
You now have a Lightning-paid API behind a single reverse proxy — suitable for AI agents and curl-based workflows alike.