Prerequisites
- A Lumx account with a Sandbox API key
- A Lovable project
- A Supabase project connected to that Lovable app (used to store your Lumx key as a secret)
Step 1 — Get your Lumx credentials
From the Lumx Dashboard, go to Developers → API Keys and copy a Sandbox key. See Authentication for details. Keys are only shown once — store them somewhere safe before closing the modal.Step 2 — Store the key in Lovable
Open your Lovable project’s secrets pane (or the Supabase dashboard for the connected project) and add:| Name | Value |
|---|---|
LUMX_API_KEY | Your Sandbox key from Step 1 |
LUMX_ENV | sandbox while building, production when you go live |
Step 3 — Paste the prompt
In the Lovable chat, paste the prompt below and let it scaffold the integration.Lovable doesn’t support MCP servers directly, but if you open the same project in Cursor or Claude Code later, connect them to Lumx’s docs MCP so the agent can pull endpoint shapes and field definitions without re-reading these guides.
Lumx integration prompt
Step 4 — Test the flow
Lovable will generate routes and a UI. Open the preview, create a sandbox customer, open the verification link, and try an on-ramp deposit. Every transaction you create in Sandbox is fully simulated — no real money moves.Example: a server-side Lumx helper
If Lovable’s generated code drifts, drop this helper in (or ask Lovable to align to it) so calls stay consistent.server/lumx.ts
FAQ
Why does the prompt force a server route for every call?
Why does the prompt force a server route for every call?
Lumx API keys carry full account access. A key in client-side code is a key on every visitor’s machine. Lovable’s server routes (or a Supabase Edge Function) keep it where it belongs.
Can I use Lovable's Supabase integration to store the key?
Can I use Lovable's Supabase integration to store the key?
Yes. Add
LUMX_API_KEY as a Supabase secret and reference it from a Supabase Edge Function. The prompt’s server routes work the same way.How do I switch from Sandbox to Production?
How do I switch from Sandbox to Production?
Replace
LUMX_API_KEY with a Production key and set LUMX_ENV=production. Production access requires a call with the Lumx team — see Environments.Which rails does the on-ramp support?
Which rails does the on-ramp support?
The available rails depend on the currency. A BRL on-ramp returns PIX details; USD returns ACH and Fedwire. See Coverage for the full list.
Next steps
- Create a customer — full reference for the customer payload
- Webhooks — subscribe to status changes instead of polling
- Use cases — patterns for global accounts, payroll, treasury, and more