Django and Stripe Payments Tutorial

  Рет қаралды 93,295

Matt Freire

3 жыл бұрын

Hey everyone
In this video, we'll implement Stripe Payments and Stripe Checkout with Django.
📖 Read the blog post
justdjango.com/blog/django-stripe-payments-tutorial
💻 Project code
github.com/justdjango/django-stripe-tutorial
Build a Gumroad clone with Django:
👉 justdjango.com
✌️ Stay in touch
Facebook: justdjangocode
Instagram: justdjangocode
Twitter: justdjangocode
Email: matt@justdjango.com
Thank you for watching and don't forget to subscribe :)
00:00 Intro
02:15 API Keys
04:50 Product Model
08:30 Stripe documentation
10:40 Install Stripe
11:05 Checkout Session view
15:45 Importing Json Response
17:30 Templates
19:40 Frontend - Add an order preview page
24:35 Creating a test product
25:15 Product and price configuration
27:50 Success & Cancel urls
30:50 Stripe webhooks
32:20 Install Stripe CLI
38:00 Verifying events on Stripe
43:30 Email Backend
48:20 Custom Payment flow -Payment Intent
57:20 Sending an email receipt

Пікірлер: 104
@Pyplane
@Pyplane 3 жыл бұрын
No other option here but to leave a comment and a thumbs up. Amazing job!
@pil_low
@pil_low 3 жыл бұрын
Pyplane and the JustDjango are truly amazing. Lot's of respect for all the great contents.
@pypro
@pypro 3 жыл бұрын
this came out 3 months later, than I needed hahaha, thanks very much dude!!! =) you rock
@adilmohak
@adilmohak 3 жыл бұрын
I haven't seen a video of youtube covering a lot of strip content with django like this, Thanks a lot!
@fransubaru
@fransubaru 2 жыл бұрын
Amazing tutorial, exactly what I needed!!!! You are the best!
@supriyomitra6135
@supriyomitra6135 2 жыл бұрын
Great content! Cleared quite a few concepts on stripe payment GW for me. Thanks.
@Redzera_
@Redzera_ 3 жыл бұрын
One of the best Django videos I've seen in my life, great job and thank you for teaching the community, I've learned a lot.
@codewithluq
@codewithluq 2 жыл бұрын
For sure, this is the best content for stripe integration
@anthonymwangi6889
@anthonymwangi6889 2 жыл бұрын
You are The GOAT of Django. RESPECT
@enesyurtsever
@enesyurtsever 3 жыл бұрын
I was wait for this
@ermtly
@ermtly 2 жыл бұрын
Thank you bro. Your mentoring skills are excellent. I have learned a lot.
@PedroHenrique-fz7fv
@PedroHenrique-fz7fv Жыл бұрын
Show de bola o vídeo com Django e Stripe. Já estou um ano usando Django, me identifico muito. 🚀🚀🚀
@chrschoeni
@chrschoeni 11 ай бұрын
Thank you very much for your really good video. I love it when not just one function is shown, but everything that can be done right away. You have a USP here.
@franciscmoldovan2153
@franciscmoldovan2153 Жыл бұрын
Very helpful sir, keep up the good work, we thank you!
@tevhidigenc2502
@tevhidigenc2502 3 жыл бұрын
You are an amazing man. I appreciate you
@gabrielreyes8324
@gabrielreyes8324 2 жыл бұрын
Dude you saved my life!
@mdnazmulh.8908
@mdnazmulh.8908 3 жыл бұрын
Cool tutorial man 💖
@karimkohel3240
@karimkohel3240 3 жыл бұрын
awesome i have always wanted to learn that!!
@alinab2824
@alinab2824 Жыл бұрын
Thanks for tutorial! Excellent content!
@amirhosseinebneroomi7280
@amirhosseinebneroomi7280 Жыл бұрын
it saved my life :) Thanks
@aminulc
@aminulc 2 жыл бұрын
Excellent Tutorial. Very well explained.
@Rajnishdangar
@Rajnishdangar 2 жыл бұрын
One Of Best I ever Watch thank's
@bellosegun
@bellosegun 3 жыл бұрын
OK first here... Thanks for this... On it Django Pirate
@dr.jamesross1024
@dr.jamesross1024 3 жыл бұрын
I have always wanted to learn that ,, thanks 😘😘😘😘😘
@gavinwiener
@gavinwiener 3 жыл бұрын
A focus on subscriptions would be awesome as well
@yoonkahchong1913
@yoonkahchong1913 3 жыл бұрын
Thanks for the tutorial
@sifathasan2755
@sifathasan2755 3 жыл бұрын
Very informative and really good tutorial
@bsmaheshkumar5328
@bsmaheshkumar5328 3 жыл бұрын
A much needed project for me... Tqs a ton 🙏
@gauravsingh-qt2zo
@gauravsingh-qt2zo 3 жыл бұрын
Hey brother can u help me in solving some problem related to m Django project???
@Jose-ol5xk
@Jose-ol5xk 2 жыл бұрын
VERY GOOD MY FRIEND THANK YOU!!
@aashayamballi
@aashayamballi 3 жыл бұрын
Thank you!
@CesarBArts
@CesarBArts 6 ай бұрын
You're amazing.
@ChristianHaugland74
@ChristianHaugland74 3 жыл бұрын
great work. so easy to follow. thanks
@mattfreire
@mattfreire 3 жыл бұрын
You're welcome. Thanks for watching!
@anandhuas598
@anandhuas598 3 жыл бұрын
I really love ur work , such an in depth explaination . Can you please show how to integrate google pay
@atulsharma3993
@atulsharma3993 3 жыл бұрын
Superb sir 🙏🙏🙏🙏🙏🙏
@CodeWithTomi
@CodeWithTomi 3 жыл бұрын
Nice tutorial
@usaava
@usaava 3 жыл бұрын
Thanks for your video :)
@mattfreire
@mattfreire 3 жыл бұрын
Thanks for watching :)
@shporsoftcodingteam4388
@shporsoftcodingteam4388 3 жыл бұрын
Oh very good. Thanks. Can you make a Subscription tutorial with Stripe?
@mattfreire
@mattfreire 2 жыл бұрын
Most up to date tutorial: justdjango.com/blog/django-stripe-payments-tutorial Hey everyone. Stripe updates their docs more times than I can keep count. I've updated the blog post to follow the latest documentation. So this video now uses a slightly older version of their documentation. But the concepts that are taught are still relevant.
@duongbui8998
@duongbui8998 2 жыл бұрын
So, when Stripe updates the document. Does your system have to change the code?
@duongbui8998
@duongbui8998 2 жыл бұрын
I'm reading the document and found that next to the checkout.session.completed event. Stripe also has checkout.session.async_payment_succeeded and checkout.session.async_payment_failed. Do you know when the 2 events happend?
@ammarjamil2467
@ammarjamil2467 3 жыл бұрын
Bro, your video is very informative kindly make one video on how to configure firebase push notification in Django
@JohnEstherGeocreatives
@JohnEstherGeocreatives 3 жыл бұрын
Also in this example how would you loop through all the products and display the prices with checkout on all of them?
@rafaelsoteldosilva
@rafaelsoteldosilva 19 күн бұрын
good!
@igorkulibaba7287
@igorkulibaba7287 3 жыл бұрын
Super! Hi in Russia!
@vladusa
@vladusa Жыл бұрын
Does anybody know how to save the data from the webhook to the database? This doesn't work for me and I've tried literally every database saving alternative. Send_email is the only function that even quasi-saves (it isn't really saving anything, more just doing an action).
@Ali-kx7jf
@Ali-kx7jf 3 жыл бұрын
Bestestest Everrr❤️!! please can you make one for paypal with django.
@maxmeza4350
@maxmeza4350 3 жыл бұрын
Nice video. What VSCode theme are you using for Python's semantic color?
@looneytoons2006
@looneytoons2006 3 жыл бұрын
thanks a lot !!! question about production with stripe !? do i need to maintain thread for run the listener. or it better to make script that at transaction will be activated 47:30
@iamdemon8304
@iamdemon8304 3 жыл бұрын
Can you make a tutorial for building a helpdesk and issue tracking system?? Anyways loved the tutorial
@JohnEstherGeocreatives
@JohnEstherGeocreatives 3 жыл бұрын
what is the importance of the custom payment method and can I use just the checkout without the custom payment?
@erfandjango8976
@erfandjango8976 3 жыл бұрын
Best
@alinandrei6555
@alinandrei6555 3 жыл бұрын
Hi. First thanks for the tutorials, really breaks down to bits my mind can process I have an issue I implemented both options with one of your older tuts (building an ecommerce website with django). Both work just fine, I've messed up a bit the urls but that's fine. My problem is that the stripe webhooks are not called anymore after implementing the custom flow payment option. Could I ask, how is the webhook view called while the checkout process, in detail? What are the steps behind the scene? Thanks
@alinandrei6555
@alinandrei6555 3 жыл бұрын
Okay so it seems that I should've just run over stripe webhooks docs for a few minutes to understand that these are requests sent by stripe to my app. The reason these were not working was that I have forgot to forward these requests to my url..
@shohanurnishad2801
@shohanurnishad2801 6 ай бұрын
if the webhook CLI is not running, will the send email function work?
@shporsoftcodingteam4388
@shporsoftcodingteam4388 3 жыл бұрын
Can you please make a video about the video conversion in Django? Like KZfaq site clone where you can choose the quality of the playing video.
@sharhanalhassan7352
@sharhanalhassan7352 3 жыл бұрын
This is a great tutorial. The first method of using a prebuilt checkout page is straightforward and simpler. Is there any reason why someone will opt for the custom payment flow as it's cumbersome and still does the same thing
@flaviusteodorof2601
@flaviusteodorof2601 2 жыл бұрын
Because they might have different needs, or just for the sake of customization.
@user-de9xw2bi8p
@user-de9xw2bi8p 7 ай бұрын
Could you please tell me, I installed stripe cli but I can't find status commands, what could be the problem?
@ngawangg927
@ngawangg927 5 ай бұрын
idk whats wrong but my starter branch repo isnt even showing the blank django prj can any one help me plz
@dennielluissadian5026
@dennielluissadian5026 3 жыл бұрын
Hi! How can we make a withdraw process using stripe? Like the site pays the user. How can we do that?
@mr-engin3er
@mr-engin3er 3 жыл бұрын
I followed your tutorial but card-element(cart input) not showing. Then i clone your repository and still same error. I searched it on Google but can't solve this issue. I'm not good at front end.
@khannakhanna815
@khannakhanna815 3 жыл бұрын
Sir How do I pay someone from my stripe to another customer bank account it is possible in the stripe or not
@VirelMontes
@VirelMontes 5 ай бұрын
I'm making a mexican restaurant website. How would I replace test product with actual menu items I have on my menu page. Instead of going from landing.html page go to menu add to cart then create a checkout session with stripe? Also if you could show an example of how to customize ingredients of each menu item before it goes into the cart.
@Migler1
@Migler1 2 жыл бұрын
I'd really like to know how to empty that cart after the payment is done.
@DarshModi-il5et
@DarshModi-il5et 3 жыл бұрын
I got 403 error in webhook and in terminal it shows Forbidden (CSRF cookie not set) . But I did exactly same as this video and I have also passed pk in stripe intent url Like , create-payment-intent// So do I have to pass pk in webhook url too ? If I try by providing static pk like , stripe listen --forward-to localhost:8000/payments/webhook/5/ Then it works fine but how can I pass dynamic id if I'm on the correct way ..? Please help
@AllthingsFoodieTX
@AllthingsFoodieTX 2 жыл бұрын
question if We wanted to add multiple Products instead of the Product.objects.get(name="productname") , How would we do it in that view with the queryset instead to be Product.objects.all() , when i do that i get a no reverse with arguments. Thanks how would i implement that in the Class based view thanks
@vladvlad3544
@vladvlad3544 Жыл бұрын
You got it do it?
@nourelhoudazemni7404
@nourelhoudazemni7404 3 жыл бұрын
oui
@najwanalharbi
@najwanalharbi Жыл бұрын
(index):1 You may test your Stripe.js integration over HTTP. However, live Stripe.js integrations must use HTTPS. How can i solve this ?
@crishl19
@crishl19 Жыл бұрын
need some help . i got this : No module named 'stripe'
@johnjim3741
@johnjim3741 2 жыл бұрын
Can you make a video on how to integrate Stripe connect, Django and react? Not many videos on this
@axeljacobo4453
@axeljacobo4453 3 жыл бұрын
could you make a django tutorial with cryptocurrency payment methods?
@gabrielpasv
@gabrielpasv 5 ай бұрын
Could you please create a video tutorial of the following django packages django-tenants django-tenants-url django-tenants-users django rest framework Thanks
@codinghustle5484
@codinghustle5484 3 жыл бұрын
It shows 200 OK but no payment is done? I don't have enough amount so why is it not throwing an error instead.
@raindrop557
@raindrop557 3 жыл бұрын
hey matt i created an eccomerce site with your eccomerce series..it is working fine but now i am trying to incoporate stripe connect but every video of yours on stripe connect only deals with one item..any idea on how to use stripe connect where a person can checkout multipe items..please help i am at a loss..
@Iamklif
@Iamklif 3 жыл бұрын
This isn't that hard to do, have you solved it yet?
@raindrop557
@raindrop557 3 жыл бұрын
@@Iamklif i did
@Ali-kx7jf
@Ali-kx7jf 3 жыл бұрын
it's what I'm looking for can you please help me.
@oldelkhot
@oldelkhot 8 ай бұрын
Thanks Matt! I can't follow you, because I think the docs are changed. I did the first 30 minutes, but I can't find the JS part
@itsnevertoolatetolearn4875
@itsnevertoolatetolearn4875 6 ай бұрын
right
@Systemx93
@Systemx93 3 жыл бұрын
Next Video Handle Files, Images, Videos, and maps
@rifathbinhossain2233
@rifathbinhossain2233 3 жыл бұрын
please make projects like creating website like udemy or coursera. thank you
@Rabekkarabe
@Rabekkarabe 3 ай бұрын
Django ക്ലാസ്സ്‌ എടുക്കുമോ? Stripe വച്ചു djangoyil എങ്ങനെ payment gateway പോസ്സിബിൾ ആകാമെന്നും ക്ലാസ്സ്‌ എടുക്കുമോ? അതുപോലെ തന്നെ otp send ആകുന്ന django ലൈബ്രറി കൂടി പഠിപ്പിക്കുമോ?. പിന്നെ django വഴി create ചെയ്ത django പ്രൊജക്റ്റ്‌ എങ്ങനെ റിയൽ ടൈമിൽ host purchase ചെയ്തു ആ hosthum നമ്മുടെ django പ്രൊജക്റ്റ്‌ എങ്ങനെ കണക്ട് നൽകാം എന്നുള്ളതിന്റെ കുറിച്ചും വീഡിയോ ചൈയ്യുമോ?
@fine-vine
@fine-vine 3 жыл бұрын
problem when u have multiple products is that the product id can be cheated in the front. If you change the product id of the button clicked. You can get the premium plan for the price of a basic one... In your case, if you change in the js product.id from 1 to 2, you get product 2 for the price of product 1
@Ali-kx7jf
@Ali-kx7jf 3 жыл бұрын
could you solve that ? I need solutions :(
@cesaraugusto9109
@cesaraugusto9109 Жыл бұрын
@@Ali-kx7jf block in the server side .
@davidbayo4243
@davidbayo4243 3 жыл бұрын
Is stripe working in Nigeria??
@Temea-pw5bv
@Temea-pw5bv 3 жыл бұрын
please come back to the chanel 😢😭
@donotlook6048
@donotlook6048 2 жыл бұрын
To anyone doing it by by these dates the docs have already changed a lot. I could do this without any javascript in the html template
@bicboi9006
@bicboi9006 2 жыл бұрын
if your watching this as of now dont waste your time its already outdated
@mostnotoriouspinpin7581
@mostnotoriouspinpin7581 Жыл бұрын
is there a way to collect commision fees from sellers on your platform?
@vladusa
@vladusa Жыл бұрын
very difficult implementation bro. You could set this up in Stripe manually, I reckon
@mostnotoriouspinpin7581
@mostnotoriouspinpin7581 Жыл бұрын
@@vladusa thanks but i already did it. Used paypal and set the merchant it and stuff
@humayunkabir-jl9tj
@humayunkabir-jl9tj Жыл бұрын
25:50
@ebbevandijk8069
@ebbevandijk8069 2 жыл бұрын
I’ve spent a good few hours debugging just to find out the api doesn’t accept floats as amounts fml
@norbertocammayo2334
@norbertocammayo2334 3 жыл бұрын
Your content are very good. Hope you could support Purchasing Power Parity on your courses to make it affordable for us low income countries.
@caglargulucan
@caglargulucan 2 жыл бұрын
well done, but the document is out of date.
@andremaia4040
@andremaia4040 Жыл бұрын
Unfortunately, it is now out of date. It seems that Stripe changes fast.
@dziurappa
@dziurappa 3 жыл бұрын
.
@mastertys3059
@mastertys3059 2 жыл бұрын
I have this error: price_id = intent["metadata"]["price_id"] KeyError: 'price_id'
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 17 МЛН
3M❤️ #thankyou #shorts
00:16
ウエスP -Mr Uekusa- Wes-P
Рет қаралды 14 МЛН
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 17 МЛН