Skip to main content
v0 by Vercel generates Next.js apps from chat. Paste the prompt below and v0 will scaffold a Lumx integration with server actions for customer onboarding, on-ramp deposits, and transaction status — ready to deploy to Vercel without leaking your API key to the browser.

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: Mark them Server-side only. v0’s generated server actions and route handlers will pick them up automatically on the next deploy.
Don’t paste your API key into the v0 chat — v0 messages are not a secret store. Add the key in the Vercel dashboard instead.

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

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.
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.
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.
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