How to use Stripe for payment in Django

  Рет қаралды 24,216

Django road

Django road

Күн бұрын

Learn how to integrate Stripe with your Django app to accept online payments through your webapp. This is a guide on how the Stripe API works, how to create the related Django code and how to test out the code locally from terminal.
The gist of the custom user model in Django: • The gist of the the cu...
The code on Github: github.com/dot...
Chapters:
---------------
0:00 intro
0:15 the Stripe API
0:53 Stripe webhook
1:30 set up a Stripe account
2:08 create Stripe product
2:45 models.py
4:21 urls.py
5:05 views.py
10:56 HTML templates
11:18 test run in terminal
13:05 outro

Пікірлер: 45
@Lorem04
@Lorem04 5 ай бұрын
we need you to drop more django projects your way of explaination so good
@wordmarkagency2732
@wordmarkagency2732 8 ай бұрын
This is the video I always wanted before learning Django stripe which gives the overall overview. Thank you very much Django Road
@sebastiancalvache8168
@sebastiancalvache8168 Ай бұрын
This is what I was looking for, thanks a lot! Keep making this kind of content.
@samuelallen1402
@samuelallen1402 4 ай бұрын
Really nice job. This is how a tutorial should be done. Complete, succinct, well documented in the description, source control example. Timeline. A fine job. I doubt I'll need to watch an hour long plus video to get this working now. Bonus points for typing skills. Finally I'm not rolling my eyes at someone attempting to type something rather pathetically, then debugging their broken code on the video. Subscribed.
@user-pl2eq2xb3u
@user-pl2eq2xb3u 5 ай бұрын
great tutorial, very well explained. clear thoughts and words.
@neverforget1575
@neverforget1575 Жыл бұрын
Great tutorial, is there any chance of making a tutorial on Stripe connect? Thanks
@djangoroad
@djangoroad Жыл бұрын
Thanks for the video ideas, will have a look but mostly people seemed interested in Stripe. Let's see if you get more thumbs up on your comment.
@neverforget1575
@neverforget1575 Жыл бұрын
@@djangoroad It is Stripe, it's their Connect API that allows you to payout vendors if you want to build a marketplace, thanks
@no-binary_dragonknight
@no-binary_dragonknight 7 ай бұрын
Thank u very much, great tutorial🙃
@themarksmith
@themarksmith 6 ай бұрын
Well explained thanks!
@mars.automarketing
@mars.automarketing 6 ай бұрын
Great video. I would really love to see a complete subscriptions implementation for SaaS. I really can't find a full tutorial
@kwandashenge9611
@kwandashenge9611 5 ай бұрын
hi what happens if you are selling more then 1 product..how do u add each product and its details
@AlexanderKurguzkin
@AlexanderKurguzkin 8 ай бұрын
Thanx, very useful!
@ThatWeirdKiidOnYT
@ThatWeirdKiidOnYT 8 ай бұрын
That's a really cool Gameboy
@uzplaylistsradio
@uzplaylistsradio 11 ай бұрын
do you have examples of how you build a payment intent
@kemosabe5120
@kemosabe5120 3 ай бұрын
Thanks! Bummer this is so bulky. Snipcart is so much easier, it passes the price from the product html in a data attribute . I don't want to have to create a whole separate product page inside stripe for each product and manage their ID's in environment variables, that's crazy.
@kitamashi
@kitamashi 6 ай бұрын
Very good video, thank you. Also, I love the keyboard, sounds like an asmr
@candai1996
@candai1996 Жыл бұрын
Great video!
@adomarc
@adomarc 6 ай бұрын
How would the code change if you want to use the embedded form option for the checkout session using django?
@IvanBalloon
@IvanBalloon Жыл бұрын
Thanks!
@shivamkumar-qp1jm
@shivamkumar-qp1jm 4 ай бұрын
What about monthly subscription plan or yearly subscription plan
@joaoarthurbandeira
@joaoarthurbandeira 8 ай бұрын
Hey, great video! For some reason there is not much content on stripe + drf integration on youtube (and how to connect it to NextJs frontend, preferably for my case). I have some questions though...How could i do so the user can add the credit card once on its 'profile area', so then, say in a second purchase, he can buy a product quickly, without having to type its credit card infos again? Can i make it so the checkout session price and quantity varies based on what product and how many of it the user selected? Also, how can i do so we can receive an email that a new user paid for our product? Many Thanks!
@mariocortes2670
@mariocortes2670 7 ай бұрын
Awesome!
@user-de9xw2bi8p
@user-de9xw2bi8p 8 ай бұрын
Good afternoon, can you tell me if it is possible to run stripe listen --forward-to localhost:4242/webhook in Docker so that it is enabled all the time?
@fbaugusto
@fbaugusto 9 ай бұрын
Thanks! :)
@kay8379
@kay8379 7 ай бұрын
thank you!!!
@aashayamballi
@aashayamballi Жыл бұрын
Thank you!
@shareefmhd1189
@shareefmhd1189 8 ай бұрын
is it necessary to create product in stripe? what if i have 1000+ products in my ecommerce website..!?
@vladimirnicolescu1342
@vladimirnicolescu1342 2 ай бұрын
you probably figured already but in the tutorial the product info was hard-coded in the stripe request. Just use variables and assign the values when the stripe check-out function is called to make it dynamic add a for loop to include every product in the shopping cart and that's pretty much it. EDIT: Ups my bad, they use an environment variable for the price... there's probably still a way of creating a form inside the shopping cart view and when you buy all the products information is submitted and you could still use the solution I offered but yeah.. I just use stripe for subscriptions so it's not that big of a deal
@naeemchaudry733
@naeemchaudry733 Жыл бұрын
the payment information will save in our database for admin to check after this ?
@AyushKumar-po8no
@AyushKumar-po8no Жыл бұрын
That keyboard sound is super irritating!!
@user-jt6uv8vx8c
@user-jt6uv8vx8c 11 ай бұрын
At least they are not blue switches. I prefer the switches you hear over clicky blues
@extorrote
@extorrote 2 ай бұрын
Really? instead of saying thank you? What an ungrateful thing you are.
@caglargulucan
@caglargulucan Жыл бұрын
I don't understand where it triggers the "stripe webhook" function? and Is a webhook necessary? When the payment is successful, it can be checked whether the payment has been paid or unpaid. checkout_session = stripe.checkout.Session.retrieve(session_id) print('status :', checkout_session['status']) # open, complete, expired print('payment_status:', checkout_session['payment_status']) # paid, unpaid, no_payment_required if checkout_session['payment_status'] == 'paid':
@davidmays2660
@davidmays2660 Жыл бұрын
I'm not an expert, but I'm betting there's an exploit with your suggested approach that is prevented by using the webhook. For what it's worth, setting up a webhook is the only official method of order fulfillment listed in Stripe's documentation for Stripe Checkout.
@beni2731
@beni2731 Жыл бұрын
Also where is the stripe_webhook being called tho? He is saying that its being called by stripe cli but when I tried to print("TEST") nothing was comming in my erminal which suggests that the view is not being called.
@tomahocbc8228
@tomahocbc8228 Жыл бұрын
thanks for this amazing content, please can do it on the PayPal server side, not the client side?
@djangoroad
@djangoroad Жыл бұрын
Hmm, anything specific there you're thinking of?
@tomahocbc8228
@tomahocbc8228 Жыл бұрын
@@djangoroad I'm a fan of Dennis Ivy he is one of the best on youtube he made a video on Django Paypal payment he said that he would add another video about server-side and he didn't after I watched your videos I found that you are also one of the best so I hope you make a full tutorial about Paypal payment both server and client-side this will be the only video on youtube who cover Paypal payment because there are a lot of countries strip doesn't supported this is the video if you hope to take a look kzfaq.info/get/bejne/bth9mbpl3LWRpok.html&ab_channel=DennisIvy
@djangoroad
@djangoroad Жыл бұрын
I see, thanks for the info! I have used Paypal before so can make a video about that at some point I just thought Stripe was more popular as I've received many requests for a Stripe tutorial. But yes Paypal is indeed popular outside the US.
@jaecheokkim99
@jaecheokkim99 Жыл бұрын
video is very useful, but sound of keyboard is quite loud. The sound is a bit distracting.
@djangoroad
@djangoroad Жыл бұрын
useful feedback, thanks
@kuindjinho
@kuindjinho Жыл бұрын
🤣smart reply i love it thanks for the video@@djangoroad
Django and Stripe Payments Tutorial
1:10:27
Matt Freire
Рет қаралды 95 М.
Add Stripe subscriptions to Django in 7 mins 💵
6:32
Tom Dekan
Рет қаралды 1,4 М.
Алексей Щербаков разнес ВДВшников
00:47
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 49 МЛН
艾莎撒娇得到王子的原谅#艾莎
00:24
在逃的公主
Рет қаралды 48 МЛН
A faster Django response with Redis cache
6:39
Django road
Рет қаралды 14 М.
React With AWS | Complete FullStack App Building
29:05
Shobhan Biswas
Рет қаралды 3,5 М.
Django & React Payments with Stripe Checkout
41:07
Bryan Brkic
Рет қаралды 11 М.
Django Paypal Payment Integration in 30 Minutes
30:20
THE PROTON GUY
Рет қаралды 10 М.
Django Stripe Payments Simplified with Donation Page
46:47
Dennis Ivy
Рет қаралды 64 М.
Setting up Stripe Subscriptions in Django
17:34
Cory Zue
Рет қаралды 13 М.
Django Stripe Payment Gateway Integration Tutorial
17:59
StudyGyaan
Рет қаралды 21 М.
Learn Django in 20 Minutes!!
21:25
Tech With Tim
Рет қаралды 351 М.
Алексей Щербаков разнес ВДВшников
00:47