Prerequisites
- A Lumx account with a Sandbox API key
- Codex CLI installed and signed in, or access to Codex Cloud at chatgpt.com/codex
- A project (or empty directory) where the integration should land
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 locally
Drop the secrets into the project’s env file and keep it out of git..env.local
.gitignore (append if missing)
Step 3 — Hook up the Lumx docs MCP (CLI only)
The Codex CLI supports the Model Context Protocol. Add Lumx’s docs MCP server to~/.codex/config.toml:
~/.codex/config.toml
Codex Cloud (the hosted variant) doesn’t expose MCP configuration today — it runs in an isolated container. Use the CLI when you want the agent to consult Lumx’s docs live.
Step 4 — Paste the prompt
In the Codex session, paste:Lumx integration prompt
Step 5 — Verify end to end
Codex will write the files, run the project, and (because the prompt asks for it) call each route with curl to confirm the shape. Walk the UI flow once: create a customer, open the verification link, start an on-ramp, and watch the transaction status update.Example: a server-side Lumx helper
The prompt aims for this shape. Drop it in directly if you’d rather wire the helper by hand.server/lumx.ts
FAQ
Should I use the Codex CLI or Codex Cloud for this?
Should I use the Codex CLI or Codex Cloud for this?
Use the CLI when you want the agent to consult Lumx’s docs MCP server live (Step 3) or when you need it to touch existing project files in place. Use Codex Cloud for fresh-repo scaffolds or longer autonomous runs in OpenAI’s sandbox — no MCP, but no local setup either.
Codex Cloud wrote code that hardcoded my key. What now?
Codex Cloud wrote code that hardcoded my key. What now?
The cloud agent sometimes inlines env values when it can read them. Pull the generated branch locally, replace any literal key with
process.env.LUMX_API_KEY, and rotate the key in the Dashboard if a literal made it into a commit.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.Can the same prompt work in a fresh, empty repo?
Can the same prompt work in a fresh, empty repo?
Yes. The prompt asks Codex to confirm a stack before scaffolding — answer with the framework you want (Next.js, FastAPI, Rails, etc.) and it sets up an idiomatic project.
Next steps
- Create a customer — full reference for the customer payload
- Webhooks — subscribe to status changes instead of polling
- MCP server — give the Codex CLI structured access to the Lumx docs