Lovable Checkout (preview)
Self-contained guide for wiring SolvaPay hosted checkout into a Lovable app. The whole guide is designed to be pasted into the Lovable chat to bias its agent toward a working integration on turn zero.
Quick Start
- Read guide.md end-to-end before generating code. The guide owns environment setup, Supabase edge function templates, the
@previewinstall commands, and the Lovable-specific guardrails. - Cross-reference reference.md for the package + hook map.
Guardrails
- Never put
SOLVAPAY_SECRET_KEYin.env,VITE_*,import.meta.env, or any file the browser can reach. The secret lives only as a Supabase edge function secret. - Never hand-roll
fetchagainsthttps://api-dev.solvapay.comfrom the browser. All SolvaPay backend calls go through Supabase edge functions. - Always install with the
@previewtag:@solvapay/react@preview,@solvapay/react-supabase@preview. Never pin an exact preview version. - Always set
SOLVAPAY_API_BASE_URL=https://api-dev.solvapay.comas a Supabase edge function secret — production keys are rejected by api-dev. - Not for production. The
@previewtag is unstable by design.