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. SetbaseUrlto match. Keys are environment-specific. - Keep
apiKeyandwebhookSecretin 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
200quickly. 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
destinationsfor each before launch. - Set real
counterpartycontact 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
splittingorpartialand retry them. There is no reconciliation job yet. - Decide how you return money to customers: refunds only reverse the split.
Better Auth
- Set
baseURLandtrustedOriginsfor your real domain. Cookie-authenticatedPOSTs 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.