Prerequisites
- A Lumx account with a Sandbox API key
- A Bolt.new project
- Familiarity with how StackBlitz exposes env vars to your runtime (Node, Next.js, Astro, etc.)
Step 1 — Get your Lumx credentials
From the Lumx Dashboard, open Developers → API Keys and copy a Sandbox key. See Authentication. Keys are only shown once.Step 2 — Store the key in Bolt
Open the.env file in the Bolt file tree (create it if missing) and add:
.env
PRIVATE_LUMX_API_KEY in some frameworks), use that — but never use a prefix that exposes the value to the client (no VITE_, NEXT_PUBLIC_, PUBLIC_, etc.).
Step 3 — Paste the prompt
In the Bolt chat, paste:Bolt doesn’t support MCP servers directly. Once you pull the generated project into Cursor or Claude Code locally, connect them to Lumx’s docs MCP so the agent can pull endpoint shapes and field definitions on demand.
Lumx integration prompt
Step 4 — Run the preview
Bolt will scaffold the project, install dependencies, and open the preview. Walk the flow once: create a customer, open the verification link, and start an on-ramp. Watch the network panel —LUMX_API_KEY should never appear in any client request.
Example: a server-side Lumx helper
If Bolt’s generated code drifts, ask it to align to this helper.server/lumx.ts
FAQ
How do I keep the key out of the bundle in Vite-based projects?
How do I keep the key out of the bundle in Vite-based projects?
Skip the
VITE_ prefix. Vite only exposes prefixed vars to the client. Read LUMX_API_KEY from a server file (an API route, a server action, a backend route) that never imports into the client tree.Can I share my Bolt project link with a teammate?
Can I share my Bolt project link with a teammate?
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.Bolt is asking for a database. Do I need one?
Bolt is asking for a database. Do I need one?
Not for this scaffold — every piece of state lives in Lumx. Skip the database prompt unless you want to persist your own customer IDs or transaction history alongside Lumx’s.
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