Notebook Studio
Production Environment

Environment Variables

Production environment variables

Add these to two places for production:

  1. Vercel - Project → Settings → Environment Variables (for the Next.js app)
  2. Convex - npx convex dashboard → Settings → Environment Variables (for anything your Convex functions read)
# ── Convex ─────────────────────────────────────────────
NEXT_PUBLIC_CONVEX_URL=https://<your-project>.convex.cloud
NEXT_PUBLIC_CONVEX_SITE_URL=https://<your-project>.convex.site

# ── Better Auth ────────────────────────────────────────
BETTER_AUTH_SECRET=<random 32+ char secret>

# ── Google Gemini ──────────────────────────────────────
NEXT_PUBLIC_GOOGLE_GEMINI_API_KEY=your-gemini-api-key
GOOGLE_GENERATIVE_AI_API_KEY=your-gemini-api-key

# ── Stripe ─────────────────────────────────────────────
# Recurring prices are created dynamically from the plan amount.
STRIPE_SECRET_KEY=sk_live_...
# Webhook signing secret for subscription lifecycle events.
STRIPE_WEBHOOK_SECRET=whsec_...

# ── PayPal ─────────────────────────────────────────────
PAYPAL_API_URL=https://api-m.paypal.com
NEXT_PUBLIC_PAYPAL_CLIENT_ID=your-client-id
PAYPAL_CLIENT_SECRET=your-secret
PAYPAL_WEBHOOK_ID=your-webhook-id

# ── Razorpay ───────────────────────────────────────────
NEXT_PUBLIC_RAZORPAY_KEY_ID=rzp_live_...
RAZORPAY_KEY_SECRET=your-secret
RAZORPAY_WEBHOOK_SECRET=your-webhook-secret

# ── Flutterwave ────────────────────────────────────────
NEXT_PUBLIC_FLUTTERWAVE_PUBLIC_KEY=FLWPUBK-...
FLUTTERWAVE_SECRET_KEY=FLWSECK-...
FLUTTERWAVE_SECRET_HASH=your-webhook-hash

# ── Dodo Payments ──────────────────────────────────────
# test_mode or live_mode (also the UI feature gate).
NEXT_PUBLIC_DODO_ENV=live_mode
# Recurring products/prices are created through the Dodo API.
DODO_PAYMENTS_API_KEY=your-live-api-key
# Webhook signing key for subscription lifecycle events.
DODO_PAYMENTS_WEBHOOK_KEY=your-webhook-signing-key

# ── Paddle ─────────────────────────────────────────────
# sandbox or production (also the UI feature gate).
NEXT_PUBLIC_PADDLE_ENV=production
# Client-side token used by the Paddle overlay checkout.
NEXT_PUBLIC_PADDLE_CLIENT_TOKEN=live_...
# Recurring prices are created through the Paddle API.
PADDLE_API_KEY=pdl_live_apikey_...
# Webhook secret for subscription lifecycle events.
PADDLE_WEBHOOK_SECRET=your-webhook-secret

# ── App ────────────────────────────────────────────────
NEXT_PUBLIC_APP_URL=https://yourdomain.com

# ── Docs (optional) ────────────────────────────────────
# Set to "true" to enable the docs site and its header/footer links.
# Disabled (hidden) by default.
NEXT_PUBLIC_SHOW_DOCS=false

# ── Resend ─────────────────────────────────────────────
RESEND_API_KEY=your-resend-api-key
RESEND_SENDER_EMAIL=Notebook Studio <noreply@yourdomain.com>

Always use live payment keys in production, and set PAYPAL_API_URL to the live endpoint. Never commit secrets to Git.