Prerequisites
- A Lumx account with a Sandbox API key
- A v0 chat
- A Vercel project for the generated app (created automatically when you click Deploy from v0)
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 as Vercel env vars
In your Vercel project, go to Settings → Environment Variables 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 v0 chat, paste:v0 doesn’t support MCP servers directly. Once you pull the generated repo into Cursor or Claude Code for follow-up work, connect them to Lumx’s docs MCP so the agent can pull endpoint shapes and field definitions on demand.
Lumx integration prompt
Step 4 — Deploy and test
Click Deploy in v0 (or push from the connected GitHub repo). Once the build picks up the env vars, walk the flow in the deployed preview: create a sandbox customer, open the verification link, and start an on-ramp.Example: a server-side Lumx helper
The prompt aims for this shape. If v0’s generated code diverges, ask it to align to the helper below.lib/lumx.ts
FAQ
Where do server actions read the env vars from?
Where do server actions read the env vars from?
Locally, from
.env.local. On Vercel, from the env vars you set in the project. Both reach process.env at runtime — the key never leaves the server.v0 put my key in a 'use client' file. What now?
v0 put my key in a 'use client' file. What now?
Move the call into a server action (
"use server") or a route handler. Client components should call those, not Lumx directly. Ask v0 to “convert the Lumx call into a server action” and it will reshuffle the boundary.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 in Vercel. Production access requires a call with the Lumx team — see Environments.Can I preview locally before deploying?
Can I preview locally before deploying?
Yes. Run
vercel env pull to copy the project env into .env.local, then pnpm dev (or npm run dev). The server actions will read the same key.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