All Projects β†’ vercel β†’ Nextjs Subscription Payments

vercel / Nextjs Subscription Payments

Licence: mit
Clone, deploy, and fully customize a SaaS subscription application with Next.js.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Nextjs Subscription Payments

Serverless Shop
Building a Serverless E-Commerce App with AWS Lambda, Stripe andΒ React πŸ’° 🌐
Stars: ✭ 325 (-19.15%)
Mutual labels:  stripe-checkout
Checkout Single Subscription
Learn how to combine Checkout and Billing for fast subscription pages
Stars: ✭ 310 (-22.89%)
Mutual labels:  stripe-checkout
Node.js-Stripe-Shopping-Cart
Example integration of Stripe's Checkout API into a Node.js application
Stars: ✭ 93 (-76.87%)
Mutual labels:  stripe-checkout
netlify-lambda-function-example
An example Netlify Lambda function that processes payments with Stripe.
Stars: ✭ 93 (-76.87%)
Mutual labels:  stripe-checkout
react-elements-netlify-serverless
Digital Wallet payments with React Stripe Elements and Netlify Functions
Stars: ✭ 21 (-94.78%)
Mutual labels:  stripe-checkout
direct-stripe
Stripe payment button for WordPress websites
Stars: ✭ 12 (-97.01%)
Mutual labels:  stripe-checkout
connect-direct-charge-checkout
Accept a payment with direct charges and Checkout
Stars: ✭ 18 (-95.52%)
Mutual labels:  stripe-checkout
React Express Stripe
πŸ’° Minimal Boilerplate for Stripe used in React and Express. Charge payments from your customers with this project.
Stars: ✭ 209 (-48.01%)
Mutual labels:  stripe-checkout
Checkout Subscription And Add On
Uses Stripe Checkout to create a payment page that starts a subscription for a new customer.
Stars: ✭ 169 (-57.96%)
Mutual labels:  stripe-checkout
Nextjs Typescript React Stripe Js
Full-stack TypeScript example using Next.js, react-stripe-js, and stripe-node.
Stars: ✭ 168 (-58.21%)
Mutual labels:  stripe-checkout
Sample Stripe Handler
Serverless function that uses the stripe api for a checkout process in a Vue application
Stars: ✭ 155 (-61.44%)
Mutual labels:  stripe-checkout
Ember Cli Stripe
Stripe checkout for Ember
Stars: ✭ 84 (-79.1%)
Mutual labels:  stripe-checkout
Github Pages Stripe Checkout
Example of a client-only (no server) donation payment page that can be hosted on GitHub using Stripe Checkout.
Stars: ✭ 75 (-81.34%)
Mutual labels:  stripe-checkout
Sample Vue Shop
See readme for newer repo details! A sample shop that shows how to manage payments with Vue, Stripe, and Serverless Functions
Stars: ✭ 1,166 (+190.05%)
Mutual labels:  stripe-checkout
Ecommerce Netlify
πŸ› A JAMstack Ecommerce Site built with Nuxt and Netlify Functions
Stars: ✭ 1,147 (+185.32%)
Mutual labels:  stripe-checkout
Checkout Netlify Serverless
Sell products on the Jamstack with Netlify Functions and Stripe Checkout!
Stars: ✭ 58 (-85.57%)
Mutual labels:  stripe-checkout
Unicorn Mart
A proof of concept e-commerce store leveraging Contentful, GatsbyJS, Stripe, and serverless via clay.run
Stars: ✭ 21 (-94.78%)
Mutual labels:  stripe-checkout
React Stripe Checkout
Load stripe's checkout.js as a react component. Easiest way to use checkout with React.
Stars: ✭ 930 (+131.34%)
Mutual labels:  stripe-checkout
Vue Stripe
Stripe Checkout & Elements for Vue.js
Stars: ✭ 669 (+66.42%)
Mutual labels:  stripe-checkout
Checkout One Time Payments
Use Checkout to quickly collect one-time payments.
Stars: ✭ 417 (+3.73%)
Mutual labels:  stripe-checkout

Next.js Subscription Payments Starter

The all-in-one starter kit for high-performance SaaS applications. With a few clicks, Next.js developers can clone, deploy and fully customize their own SaaS subscription application.

Features

Demo

Screenshot of demo

Architecture

Architecture diagram

Deploy with Vercel

The Vercel deployment will guide you through creating a Supabase account and project as well as a Stripe test account and automatically creates the Stripe webhook endpoint for you. After installation of the Supabase and Stripe integrations, all relevant environment variables will be set up so that the project is usable immediately after deployment πŸš€

Deploy with Vercel

Screenshot of Vercel deployment

Once the project has been deployed, continue with the configuration steps below.

Configure Supabase Auth

[Optional] - Set up OAuth providers

You can use third-party login providers like GitHub or Google. Refer to the docs to learn how to configure these.

Configure Stripe

Create product and pricing information

For Stripe to automatically bill your users for recurring payments, you need to create your product and pricing information in the Stripe Dashboard. When you create or update your product and price information, the changes are automatically synced with your Supabase database.

Stripe Checkout currently supports pricing plans that bill a predefined amount at a specific interval. More complex plans (e.g. different pricing tiers or seats) are not yet supported.

For example, you can create business models with different pricing tiers, e.g.:

  • Product 1: Hobby
    • Price 1: 10 USD per month
    • Price 2: 100 USD per year
  • Product 2: Freelancer
    • Price 1: 20 USD per month
    • Price 2: 200 USD per year

Configure the Stripe customer portal

  1. Set your custom branding in the settings.
  2. Configure the Customer Portal settings.
  3. Toggle on "Allow customers to update their payment methods".
  4. Toggle on "Allow customers to update subscriptions".
  5. Toggle on "Allow customers to cancel subscriptions".
  6. Add the products and prices that you want to allow customer to switch between.
  7. Set up the required business information and links.

That's it

That's it, you're now ready to earn recurring revenue from your customers πŸ₯³

Going live

Before going live, make sure you archive all your test mode Stripe products, so you don't end up having a mix of test and live mode products on your page. Before creating your live mode products, make sure to follow the steps below to set up your live mode env vars and webhooks.

To run the project in live mode and process real payments with Stripe, you can add the Stripe Go Live integration to your project. This will set up your live API keys and webhook secret as environment variables for the production environment.

Afterward you will need to rebuild your production deployment for the changes to take effect. Within your project Dashboard, navigate to the "Deployments" tab, select the most recent deployment, click the overflow menu button (next to the "Visit" button) and select "Redeploy".

Develop locally

Deploying with Vercel will have created a repository for you which you can clone to your local machine.

Next, use the Vercel CLI to link your project:

vercel login
vercel link

Setting up the env vars locally

Use the Vercel CLI to download the development env vars:

vercel env pull .env.local

This will create a new .env.local file in your project folder. For security purposes you will need to set the SUPABASE_SERVICE_ROLE_KEY manually from your Supabase dashboard (Settings > API). Lastly, the webhook secret differs for local testing vs. when deployed to Vercel. Follow the instructions below to get the corresponding webhook secret.

Use the Stripe CLI to test webhooks

First install the CLI and link your Stripe account.

Next, start the webhook forwarding:

stripe listen --forward-to=localhost:3000/api/webhooks

The CLI will print a webhook secret (such as, whsec_***) to the console. Set STRIPE_WEBHOOK_SECRET to this value in your .env.local file.

Install dependencies and run the Next.js client

npm install
npm run dev
# or
yarn
yarn dev
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].