Skip to content

Stripe

Building a SaaS based product often includes a pricing page and a payment process. While there are many payment vendors you can choose to integrate with, StarterStack comes with a minimal Stripe implemenation to get you started. There are several ways to integrate with Stripe. This integration assumes the following approach:

  1. you are creating a Stripe hosted checkout page
  2. you have created your products in Stripe

With that in mind, StarterStack provides a pricing plan page that connects to the /products api which connects to your Stripe account to retrieve your producs. When a user selects a product, the /checkout api is called which creates a Stripe payment intent and redirects the user to your Stripe hosted checkout page. Once the user has completed the checkout page, Stripe will begin sending events to the StarterStack /webhook. This webhook receives standard Stripe payment events passing them along to event handlers for processing. This follows the standard Stripe process.

The Complete Flow

Stripe Checkout Flow

NOTE

You will need your own Stripe account. Please sign up for Stripe if you do not already have an account.

Products API

Returns your Stripe active products and prices

Checkout API

Creates a Stripe payment session and returns a Stripe hosted checkout page url

Webhook

Receives standard Stripe payment events. The middleware mapped to this route includes some common event handlers. You can add more as your use cases warrant.