Skip to main content
Paste this prompt into your coding agent to add Lumx payments to a Next.js app without leaking the key or breaking signature checks. The agent keeps the API key on the server, builds route handlers for customers and deposits, verifies webhooks over the raw body, and connects the docs MCP server.

Before you start

  • A Sandbox API key. See Authentication.
  • A Next.js app on the App Router.
  • A webhook endpoint registered under Developers > Webhooks in the Dashboard. See Webhooks.

Prompt

Prompt

How to use

  1. Tell the agent which Next.js version and whether you are on the App or Pages Router before it starts — the raw-body handling differs and this prompt assumes App Router.
  2. Create the key and the webhook endpoint yourself; the tunnel URL has to exist before the handler can be tested.
  3. Review the client-server boundary by hand at the end. It is the one thing in this prompt where a mistake is invisible until it is public.

What the prompt builds

Errors to expect

These codes come from the errors catalog, for the resources this prompt uses. Match on code, not on message.

Authentication

API keys and the production IP allowlist.

Webhooks

Event catalog, signatures, and retries.

Connect your agent to the Lumx docs MCP

Connect your agent to these docs so it stops guessing field names.

Integrate on-ramps from fiat to stablecoin

Take fiat in and deliver stablecoin to the customer’s wallet.