Skip to Content
better-auth-nuvion

Going to production

A checklist for moving from the Nuvion sandbox to production with the plugin.

Not verified against Nuvion production

The plugin has been exercised against the Nuvion sandbox only. Treat this page as a checklist to work through, not a promise.

Keys and environments

  • Use a sandbox key (https://api.nuvion.dev) while you build and a production key (https://api.nuvion.co) only when you are ready. Set baseUrl to match. Keys are environment-specific.
  • Keep apiKey and webhookSecret in the environment or a secrets manager. Never commit them or send them to the browser.
  • Use a key with only the role you need. Creating webhooks needs Owner or Developer; payments and transfers need Operations or higher.

Webhooks

  • Register an https URL for your production host and store its signing secret.
  • Set webhookToleranceMs (for example five minutes) so replays are rejected.
  • Return 200 quickly. Do heavy work outside the request; the plugin already acknowledges ignored events.
  • Rotate the signing secret by creating a new webhook, switching webhookSecret, then deleting the old one.

Database

  • Run the migration on your production database (npx @better-auth/cli migrate). It has been checked on SQLite and Postgres; MySQL, Prisma and Drizzle adapters are not verified.
  • Event de-duplication relies on a unique constraint on nuvionEvent.eventId. Keep it.
  • Amounts and timestamps are bigint; make sure your driver returns them as numbers or strings the plugin can coerce.

Money movement

  • Bind every organization to its own Nuvion account and run destinations for each before launch.
  • Set real counterparty contact details.
  • Fund the accounts that pay out and account for Nuvion's own fees, which are not attributed to legs yet.
  • Monitor payments stuck in splitting or partial and retry them. There is no reconciliation job yet.
  • Decide how you return money to customers: refunds only reverse the split.

Better Auth

  • Set baseURL and trustedOrigins for your real domain. Cookie-authenticated POSTs are checked against them.
  • Keep Better Auth's rate limiting on for the plugin's endpoints.
  • The plugin's endpoints use the signed-in session. If you call them from a server, add your own authentication in front.

On this page