NextFire main logoNextFire
Docs X
Introduction
Get Started
Clone repo
Run the app
Configuration
Firebase
Create firebase app
Authentication
Firestore
Storage
Functions
Global configuration
Public
Site config
Payments
Stripe
One time
Subscriptions
Webhooks
Usage
Project structure
Static pages
Public pages
Protected pages
Auth
Client auth
Server auth
Data fetching
Firestore client
Firestore admin
Functions
Storage
Content
Blog
Documentation
Components
Markdown
Cards
Diagrams
Filetree
Lists
Maths
Notes
Steps
Table
Tabs
Public
Deep
Deeper
Even deeper
  1. Payments

Payments

Learn how to handle payments in your SaaS using Stripe, supporting both one-time payments and subscriptions.

Your SaaS starter boilerplate supports both one-time payments and recurring subscriptions. All payments are powered by Stripe, the most popular and secure payment platform.

This guide explains how payments are structured, why we use Stripe, and how you can manage different payment models for your SaaS.

Payments

1

Introduction to Payments

Payments are a critical part of any SaaS business. They allow you to:

  • Monetize your app
  • Offer flexible pricing to users
  • Track revenue and subscriptions

In this boilerplate, payments are fully integrated with Stripe, allowing you to process transactions safely and reliably.

2

Why Stripe

Stripe is chosen because it is:

  • Secure and PCI compliant
  • Flexible for both one-time and subscription payments
  • Well-documented with extensive API support
  • Supports multiple payment methods (cards, wallets, etc.)

Using Stripe ensures your users have a smooth checkout experience and your financial operations are robust.

3

Payment Models Supported

This starter boilerplate supports two types of payments:

1️⃣ One-Time Payments

  • Ideal for selling a single product or service.
  • User is charged once and gains access to the product.
  • Example: Paying for an eBook or a one-time setup fee.

2️⃣ Subscription Payments

  • Ideal for recurring SaaS plans (monthly/yearly).
  • User is charged on a regular interval automatically.
  • Example: Starter, Pro, and Business plans with recurring billing.

You can choose which payment model suits your app or even offer both simultaneously.

4

How It Works in This Boilerplate

  • Stripe integration is pre-configured for both payment types.
  • Subscription plans are stored in /config/landing.ts (see plans array).
  • Payment processing uses Stripe Checkout sessions for simplicity and security.
  • Webhooks are set up to handle subscription events (e.g., renewals, cancellations).

Note: You will need a Stripe account and API keys configured in your .env file.

5

Next Steps

  • Configure your Stripe API keys in the .env file.
  • Customize your plans and pricing in /config/landing.ts.
  • Learn about the Stripe Checkout flow and webhook handling.

This setup allows you to accept payments safely and start monetizing your SaaS immediately.

Tips

  • Always test payments in Stripe’s test mode before going live.
  • Keep your plan IDs and pricing consistent between /config/landing.ts and Stripe.
  • Use descriptive webhook events to handle subscription updates programmatically.
Site configStripe

On this page

Tips

Content

FeedbackEdit page

© 2025 Ship IT.

Rubix Studios logo