SDK Integration
Add SolvaPay to an existing TypeScript / JavaScript app via the @solvapay/* packages.
Quick Start
- Read guide.md — the entry point with stack detection, clarifying questions, and the implementation order (init → auth mapping → paywall → webhooks → sandbox).
- Run
npx -y solvapay@latest initto authenticate and install base packages (@solvapay/server,@solvapay/core,@solvapay/auth). - Follow the matching stack guide:
- nextjs/guide.md
- react/guide.md
- express/guide.md
- mcp-server/guide.md — fetch-first MCP server already in place (Cloudflare Workers, Supabase Edge, Deno)
- supabase-edge/guide.md
- Use reference.md for package map and API operations; webhooks.md for signature verification.
Guardrails
- Never expose
SOLVAPAY_SECRET_KEYto client code or public env vars. - Never build custom card collection if hosted checkout satisfies requirements.
- Always prefer official SolvaPay SDK helpers over ad-hoc raw HTTP calls.
- Always keep paywall checks server-side or tool-handler-side (never browser-only).
- Always include a failure-path test in sandbox before calling implementation complete.
When NOT to use this skill
- Scaffolding a brand-new paid MCP server from OpenAPI or from scratch — use
create-mcp-appinstead. - Pasting hosted checkout into a Lovable app — use
lovable-checkoutinstead. - Adding hosted checkout to a brand-new Next.js / React web app with no other SDK needs —
website-checkoutcovers the minimal slice.