How I implement a credit systems using stripe

preview_player
Показать описание
YT Chapters generated using:

00:00 - Setting up a credit system using Stripe
01:06 - Generating timestamps for YouTube videos
01:48 - Walking through the code for the buy credits page
03:43 - Using Stripe to buy credits
04:12 - Setting up the Stripe webhook dashboard
05:01 - Handling webhook events from Stripe
06:54 - Updating user credits in the Prisma model
07:26 - Buying chapters and decrementing credits
08:39 - Conclusion and invitation to try the side project

Рекомендации по теме
Комментарии
Автор

Have been avoiding Stripe for years now but you make it very easy to consume. Kudos

monfernape
Автор

You are the man!! Thanks a lot for sharing your knowledge. I have learned a lot from you.

rotivanov
Автор

This is very neat! Thank you for the tutorial!

FlorinPop
Автор

Nice presentation, I do believe there is needed also a transaction log (as a User for sure I wish to check/validate/inspect all my transactions.) It is good also for auditing purpose.

claudiufarcas
Автор

Prisma Transactions would work perfect for that update and decrement scenario.

Tyheir
Автор

Great video. Obviously still in development, but you should try moving the payment process as a popup on the pricing page, instead of going to another page then coming back. Paypal do that and it's so annoying for the end user! Keep up the good work. Stripe rocks.

Drainos
Автор

Don't know how I missed this video! This is exactly what I need 😀 Even wanted to ask you on Discord how you implemented token system for your icon generator saas. Thanks Cody!

orcdev
Автор

exactly, it will be fantastic if you make a simple tutorial about the stripe credit system , it will be great

عبدالرحمن-سيظ
Автор

Great video. Another question, Are you creating a product in the Stripe dashboard with 3 different pricing?

amorto
Автор

Thanks for sharing, what's theme icon pack your using btw?

namanh
Автор

Thanks for this mate! Would love to see how you create your saas apps in next, do you have any video going through an app? Have some AI saas ideas in mind but not sure how to start. Cheers

Kkvta
Автор

I have a AI service and I was lost on how to price it, this helped me a lot thank you! If you dont want to share this particular code, can you make a separate project/indepth tutorial?

yarapolana
Автор

Was using Prisma and SST in this project difficult to configure. I know on SST discord they kind of discourage using Prisma. Maybe you can do a video on how you set up this project.

Ethanishful
Автор

Very simple to understand now. Thank you.

optimbro
Автор

Something that may be unrelated but whenever somebody is using the credits, shouldn’t the operation be made transactional mainly due to issues like double charging (race condition where a user might try to invoke this action a few times in parallel)

kirilmilanov
Автор

please please do make tutorial on this topic, it would be really helpful

ullaskunder
Автор

Love this!

With stripe redirect to dashboard - does it wait for the hook to complete applying the credit?

What if the redirect completes before the hook is finished processing?

abdullahislam
Автор

hey there cody, nice video, may i know how you implemented the nextjs progress bar ?

DanielClipsTVS
Автор

you should create a browser extention for you new side project

sivuyilemagutywa
Автор

How do you design your apps? Do you just have a set of templates you already have and just dive right in? I guess what I really want to know is what’s your process?

techwithtolu