Skip to content
SaaSTARTER
All posts
Tutorial/January 22, 2026/SaaSTARTER Team

Setting Up Stripe Payments in 5 Minutes

A step-by-step guide to integrating Stripe payments into your SaaSTARTER project. From API keys to your first test transaction in under 5 minutes.

Stripe is the gold standard for online payments, and SaaSTARTER comes with deep Stripe integration out of the box. This guide will walk you through the setup process.

Prerequisites

  • A Stripe account (free to create at stripe.com)
  • SaaSTARTER Backend+Frontend Pro tier installed
  • Node.js 20+ (database runs automatically via PGlite)

Step 1: Get Your API Keys

Log in to your Stripe Dashboard and navigate to Developers > API keys. Copy your publishable key and secret key. For development, use the test mode keys — they start with pk_test_ and sk_test_.

Step 2: Configure Environment Variables

Add your keys to the .env file in the root of your project. SaaSTARTER automatically picks up STRIPE_PUBLIC_KEY and STRIPE_SECRET_KEY from your environment.

Step 3: Set Up Webhooks

Stripe uses webhooks to notify your app about events like successful payments, refunds, and subscription changes. In your Stripe Dashboard, add a webhook endpoint pointing to your-domain.com/api/stripe/webhook. For local development, use the Stripe CLI to forward events to localhost.

Step 4: Test a Transaction

Add a product to your cart and proceed to checkout. Use Stripe test card number 4242 4242 4242 4242 with any future expiration date and any CVC. If everything is configured correctly, you will see the order confirmation page and a new order in your admin dashboard.

That is it. You now have a fully functional payment system. When you are ready to go live, swap your test keys for production keys and you are good to go.

StripePaymentsTutorial
Included in LITEBuy Template
Setting Up Stripe Payments in 5 Minutes | SaaSTARTER Blog | SaaSTARTER