Zuu
Zuu10mo ago

Stripe Subscription

I have seen this example in next.js https://subscription-payments.vercel.app/ where the user can select a product from a list retrieved from Stripe. Users can then subscribe. The app will store subscription and customer information in a Supabase DB. Once subscribed, the user can manage subscriptions in the stripe portal. I need something like this but have no idea where to start.
Next.js Subscription Starter
Brought to you by Vercel, Stripe, and Supabase.
3 Replies
Zuu
Zuu10mo ago
Just to be clear, my app is a web-app at this point, not a mobile app.
Luis
Luis10mo ago
Hey @Zuu, great question. BuildShip works great with Stripe and there's already a couple of templates available for getting started with pairing Stripe with BuildShip. For something like this you'd typically have to go through a couple of steps: 1. Creating a secure checkout session for the Product/service (assuming you've created these in your stripe account, https://stripe.com/docs/products-prices/pricing-models) 2. Capturing the subscription create event to save the subscription and customer details in your database. You may add additional steps for handling events when a subscription is updated or deleted, but the aforementioned should be enough to get you started. You may use these two templates as a starting point: 1. Stripe Create Checkout Session - for creating the checkout session for the subscription 2. Stripe Save Subscription - for saving in database, in this case supabase. Hope this helps.
No description
Zuu
Zuu10mo ago
Hey @Luis appreciate the message. What's not that clear is when a user signs-up, it should first check Stripe for the available products and pricing plans for the user to choose which one they want. These should be displayed. Once the user makes his choice, a checkout session can be created. I was hoping that someone had done this before with Stripe subsriptions and could help me learn how to do it. The available templates in Buildship don't really help a complete beginner like me. Confused.com.