Documentation
Payment Gateways

Integrating Payment Gateways

Currently StudyStudio supports the following payment gateways:

We will guide you through the process of integrating these payment gateways into your StudyStudio application.

Stripe

The current setup for a subscription based system is a single Monthly plan. To enable Stripe billing, you will need to fill out the following fields in your .env file:

Replacing Secret Key

Replace your-stripe-secret-key with your original Stripe Secret key from Stripe dashboard page (opens in a new tab).

Replacing Webhook Secret

Replace your-stripe-webhook-secret with your original Stripe Webhook Secret from Stripe webhook page (opens in a new tab) by creating a new endpoint that points to the following URL: your-app-url/api/stripe/webhook. The webhook should be listening for the following events:

  • checkout.session.completed
  • customer.subscription.created
  • customer.subscription.deleted
  • customer.subscription.updated
  • invoice.payment_succeeded
  • invoice.payment_failed

Replacing Monthly Subscription Price ID

⚠️

Currently you can only offer a single subscription. Additional subscription plans will be added in the future.

Before you can replace your-stripe-monthly-subscription-price-id, you need to create a new price product from your Stripe product page (opens in a new tab). On the product catalog, you will find the Create product button. Click on it and fill out the necessary details. Select the Recurring option and set the Billing interval. Afterwards, click on the Add product button. Now once created and you're on the Product page, click on the three dots on the right side of the product and select Copy price ID.

This is the Price ID you need to replace your-stripe-monthly-subscription-price-id with.

.env.local
NEXT_PUBLIC_STRIPE_MONTHLY_SUBSCRIPTION_PRICE_ID = your-stripe-monthly-subscription-price-id
StudyStudio
Example for a monthly subscription product.

PayPal

To enable PayPal billing, you will need to perform the following steps:

Currently under development. Thank you for your patience.

Razorpay

To enable Razorpay billing, you will need to perform the following steps:

Currently under development. Thank you for your patience.

© 2025 StudyStudio Inc. All rights reserved.