Payment Gateways
Configure the six gateways for testing
Notebook Studio supports six payment gateways out of the box: Stripe, PayPal, Razorpay, Flutterwave, Dodo Payments, and Paddle. Add keys for the ones you plan to use - the upgrade dialog automatically hides a gateway whose public key is not set.
Stripe
- Create a Stripe account and grab your secret test key from the Developers dashboard.
STRIPE_SECRET_KEY=sk_test_...No product or price ID is needed - Notebook Studio creates the recurring
checkout price dynamically from the plan amount. Set STRIPE_WEBHOOK_SECRET
and point a Stripe webhook at <your-convex-site>/stripe-webhook so
subscription events (created, renewed, cancelled) stay in sync.
PayPal
Create a PayPal Developer app to get sandbox credentials:
# Sandbox: https://api-m.sandbox.paypal.com | Production: https://api-m.paypal.com
PAYPAL_API_URL=https://api-m.sandbox.paypal.com
NEXT_PUBLIC_PAYPAL_CLIENT_ID=your-client-id
PAYPAL_CLIENT_SECRET=your-secret
PAYPAL_WEBHOOK_ID=your-webhook-idPoint a PayPal webhook at <your-convex-site>/paypal-webhook and paste its
id into PAYPAL_WEBHOOK_ID.
Razorpay
From the Razorpay dashboard, add your test key id and secret:
NEXT_PUBLIC_RAZORPAY_KEY_ID=rzp_test_...
RAZORPAY_KEY_SECRET=your-secret
RAZORPAY_WEBHOOK_SECRET=your-webhook-secretPoint a Razorpay webhook at <your-convex-site>/razorpay-webhook and paste
its signing secret into RAZORPAY_WEBHOOK_SECRET.
Flutterwave
From the Flutterwave dashboard, add your test public, secret, and encryption keys:
NEXT_PUBLIC_FLUTTERWAVE_PUBLIC_KEY=FLWPUBK_TEST-...
FLUTTERWAVE_SECRET_KEY=FLWSECK_TEST-...
FLUTTERWAVE_ENCRYPTION_KEY=your-encryption-key
FLUTTERWAVE_SECRET_HASH=your-webhook-hashPoint a Flutterwave webhook at <your-convex-site>/flutterwave-webhook and
set FLUTTERWAVE_SECRET_HASH to the secret hash you choose.
Dodo Payments
Create a Dodo Payments account, switch the dashboard to Test mode, and copy your API key:
NEXT_PUBLIC_DODO_ENV=test_mode
DODO_PAYMENTS_API_KEY=your-test-api-key
DODO_PAYMENTS_WEBHOOK_KEY=your-webhook-signing-keyNo product or price ID is needed - the recurring product and price are
created through the Dodo API on the first checkout. Point a Dodo webhook at
<your-convex-site>/dodo-webhook and paste its signing key into
DODO_PAYMENTS_WEBHOOK_KEY.
Paddle
Create a Paddle account, switch to the Sandbox, and copy the client-side token and API key:
NEXT_PUBLIC_PADDLE_ENV=sandbox
NEXT_PUBLIC_PADDLE_CLIENT_TOKEN=test_...
PADDLE_API_KEY=pdl_sdbx_apikey_...
PADDLE_WEBHOOK_SECRET=your-webhook-secretCheckout opens the Paddle overlay and prices are created automatically
from the plan amount. Point a Paddle webhook at
<your-convex-site>/paddle-webhook and paste its secret into
PADDLE_WEBHOOK_SECRET.
Test a Purchase
Start the app, open the upgrade dialog, and buy a plan. Use the gateway's test cards. Payments create a recurring subscription; the gateway webhook records the active plan and renewal date, so the user's plan updates in real time. If a key is missing, the dialog shows a friendly "not set up" toast instead of failing. Webhook endpoints live at /stripe-webhook, /paypal-webhook, /razorpay-webhook, /flutterwave-webhook, /dodo-webhook, and /paddle-webhook on your Convex site.