Examples
A full Next.js app that uses the plugin from npm, that you can try with your own Nuvion sandbox.
The example is a complete Next.js (App Router, TypeScript) app. It installs @umohpyro/better-auth-nuvion from npm, and it uses SQLite locally and Neon Postgres when hosted.
What you can do in it
Connect your sandbox
Paste a Nuvion sandbox API key, pick your entity, and create your webhook with one click. The key is encrypted on the server and never sent back to the browser. See Multi-tenant keys.
Build the hierarchy
Create three organizations, chain them, give each its own Nuvion account, and set fee rules. Hierarchy, Fees.
Take a payment
Create a checkout, pay it with the sandbox bank, and follow each leg as it moves. Retry failed legs, or refund. Payments, Failures, Refunds.
It also links to Hookbox so you can watch every webhook Nuvion sends. Everything runs in your own Nuvion sandbox; nothing real moves.
Where the plugin is used
| What | In the example |
|---|---|
nuvion({...}) with organization() and apiKey() | lib/auth.ts |
Typed client with nuvionClient() | lib/auth-client.ts |
Per-customer key through the plugin's fetch option | lib/nuvion-fetch.ts |
| Per-customer webhook receiver that forwards to the plugin | app/api/nuvion/webhook/[token]/route.ts |
| Parent, bind, fee rule, destinations | app/orgs/page.tsx |
| Payments, retry, refund | app/payments/page.tsx |
Source
The example's source repository is private until the plugin is published, so these paths are for reference. The behaviour on this page is what you will see in the live app.
What the example had to work around
The example is also how the plugin was tested as a real consumer. The gaps it found, and which are fixed, are in Status and limits.