StudyStudio
Local Environment

Payment Gateways

Configure Stripe, PayPal, Razorpay, and Flutterwave for testing

StudyStudio supports four payment gateways out of the box: Stripe, PayPal, Razorpay, and Flutterwave. Add keys for the ones you plan to use - the upgrade dialog automatically hides a gateway whose public key is not set.

Stripe

  1. 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 - StudyStudio creates the checkout price dynamically from the plan amount. There is no webhook endpoint to configure: Stripe redirects the user back to the app after payment and the plan is applied there.

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

Razorpay

From the Razorpay dashboard, add your test key id and secret:

NEXT_PUBLIC_RAZORPAY_KEY_ID=rzp_test_...
RAZORPAY_KEY_SECRET=your-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

Test a Purchase

Start the app, open the upgrade dialog, and buy a plan. Use the gateway's test cards. Successful payments call the setPlan Convex mutation and update the user's plan in real time. If a key is missing, the dialog shows a friendly "not set up" toast instead of failing.

On this page