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
- Do what Nuvion's own go-live list asks: production base URL, key and webhook URLs, and confirm state before acting. The plugin does the last one by default (
confirmEvents). - Set
cronSecretand schedule the reconcile so a lost webhook is recovered. - The plugin's transfer path has been run on production (a ₦1.00 book transfer and its refund reversal), see Status. Do the same for your own accounts before opening up: move the smallest amount between two of your accounts and check that the webhook settles it.
- First production payment: use the smallest amount Nuvion accepts. For an open-banking checkout that is
100(£1.00); a smaller amount is refused. Pay it from your own bank, with a two-level structure, and check that the funding session, the transfers and the webhooks all line up before you open it to customers. - 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. Nuvion does not charge for book transfers.
- Monitor payments stuck in
splittingorpartialand retry them, or callPOST /nuvion/payments/reconcileon a schedule of your own. - 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.