This article is a tutorial on creating a Redwood app that uses Stripe Checkout and Elements product in a fictituous context created to expose Stripe features without any security risks. Note: click on that link requires an existing Stripe account; the tutorial explains how to create one.
Since this tutorial is rather large, an Index will be provided to simplify moving to different sections of the tutorial.
... under development
Who never wanted to build a marketplace for [fill in the blank]?
The goal of this tutorial is to illustrate how to use RedwoodJS and Stripe in the context of building an app that facilitates the payments infrastructure for the internet. Stripe's mission and motto is
Millions of companies of all sizes—from startups to Fortune 500s—use Stripe’s software and APIs to accept payments, send payouts, and manage their businesses online.
More specifically, this tutorial shows how to create a boilerplate application that is using the stripe API to build a marketplace with subscriptions. Yes, each seller is going to need to buy a subscription to be able to sell on our platform. We're a greedy bunch. Note that this tutorial is not about making things pretty, nevertheless we will be using tailwind to add css classes for the layout, we will not comment on this, you can look up what the classes are doing here.
Note: We'll be using Typescript for this tutorial, it doesn't mean that you have to use it. You could strip out the typescript parts and use the
yarn create redwood-app without the
--ts option, I won't judge you. Other people might...
My setup is a mess, how do I restart? You can follow the instructions here
Ok, now that we know we're going to buy an Island in the Pacific very soon, we need to divide and conquer and figure out what are the different steps going to be:
- Setup & Authentication
- List Subscriptions
- View my subscription
- Cancel or change my subscription
- Add products
- List products by category
- Buy products
- Show if I own a product
- Seller payouts (minus platform fee)
- Check subscription validity
- (admin) Payment list
- (admin) Sellers list and Sales