SnapSummary logo SnapSummary Try it free →
Stripe & Firebase Tutorial • Add Payments To Your NextJS App
pixegami · Watch on YouTube · Generated with SnapSummary · 2026-05-31

Executive Brief

Build Firebase-authenticated subscriptions with Stripe

Speaker: Unnamed instructor / independent developer (tutorial video)

Summary: The video demonstrates how to add monthly subscription payments to a Next.js web app by combining Firebase authentication and a Firebase-hosted Stripe integration. It walks through creating a Firebase project, enabling Google sign-in, installing and initializing Firebase in Next.js, installing Stripe via the Firebase "Run Payments With Stripe" extension, configuring Firestore and Stripe webhooks, creating a Stripe product/price, and wiring checkout and customer-portal flows so subscription status is available in Firestore. The end result is a static Next.js site where users log in with Google, subscribe for $10/month, view subscription state, and manage/cancel via Stripe’s portal.

  1. Use a simple, opinionated stack to move fast. Next.js for the frontend, Firebase for auth/database/cloud functions, and Stripe for payments minimize boilerplate and let you focus on wiring flows rather than building infrastructure.
  2. Prefer backend-mediated payment logic. Although you could call Stripe directly from the client, tying Stripe to Firebase lets you map Stripe customers to Firebase users and centralize payment/subscription state in Firestore.
  3. Leverage the official Firebase Stripe extension. The "Run Payments With Stripe" extension automates customer creation, webhooks, cloud functions, and Firestore syncing so you don’t implement complex mapping and event handling yourself.
  4. Expect some manual configuration. Installing the extension requires enabling billing, creating Firestore, assigning roles, and adding Stripe API keys and webhook secrets — these steps are necessary and non-optional.
  5. Use Stripe test mode during development. Create test products/prices and use Stripe’s test card numbers to validate the checkout and subscription flows without real charges.
  6. Wire client -> Firebase cloud functions for checkout. Create an async utility that calls the extension’s cloud function to create a checkout session (returning a URL) instead of calling Stripe from the browser.
  7. Read and adapt docs/code; SDKs may be outdated. The extension’s client SDK/examples can lag Firebase API changes; be prepared to convert or call the deployed cloud functions directly if needed.
  8. Store subscription state in Firestore. The extension keeps Stripe customers, checkout sessions, and subscriptions in sync with Firestore so your app can query a user’s subscription status without calling Stripe.
  9. Provide a customer-portal link via cloud function. Use the extension’s portal-link function to produce a managed-portal URL that lets users update payment methods or cancel subscriptions.
  10. Keep secrets secure. Use restricted Stripe keys where possible and never commit secret keys to public repos; use Firebase secrets for webhook signing and API credentials.
  11. Optimize latency for UX. Checkout and portal creation call cloud functions and can be slow; prefetching URLs or caching can improve perceived responsiveness.
  12. Use Firebase auth hooks in Next.js. Initialize Firebase client, get auth.currentUser, and update UI (login, logout, account routing) using React hooks to reflect login and subscription state.
  13. Validate behavior with real test data. After subscribing in test mode confirm the Stripe dashboard and Firestore both reflect the new customer, checkout session, and subscription to ensure the integration is working.
  14. Rely on the provided GitHub starter. Reuse the instructor’s repository and pasted utility functions (checkout, portal, getPremiumStatus) to avoid reimplementing delicate cloud-function interactions.

Summarize any YouTube video instantly

Get AI-powered summaries, timestamps, and Q&A for free.

Generate your own summary →
More summaries →