How to use Stripe for payment in Django

Поділитися
Вставка
  • Опубліковано 15 вер 2024

КОМЕНТАРІ • 46

  • @Lorem04
    @Lorem04 6 місяців тому +5

    we need you to drop more django projects your way of explaination so good

  • @wordmarkagency2732
    @wordmarkagency2732 8 місяців тому +1

    This is the video I always wanted before learning Django stripe which gives the overall overview. Thank you very much Django Road

  • @sebastiancalvache8168
    @sebastiancalvache8168 2 місяці тому

    This is what I was looking for, thanks a lot! Keep making this kind of content.

  • @samuelallen1402
    @samuelallen1402 5 місяців тому

    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.

  • @neverforget1575
    @neverforget1575 Рік тому +9

    Great tutorial, is there any chance of making a tutorial on Stripe connect? Thanks

    • @djangoroad
      @djangoroad  Рік тому +2

      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

  • @adamatraore-x5g
    @adamatraore-x5g 6 місяців тому

    great tutorial, very well explained. clear thoughts and words.

  • @adomarc
    @adomarc 7 місяців тому

    How would the code change if you want to use the embedded form option for the checkout session using django?

  • @uzplaylistsradio
    @uzplaylistsradio Рік тому +1

    do you have examples of how you build a payment intent

  • @АнтонКородян
    @АнтонКородян 9 місяців тому

    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?

  • @kwandashenge9611
    @kwandashenge9611 6 місяців тому

    hi what happens if you are selling more then 1 product..how do u add each product and its details

    • @snackandlearn
      @snackandlearn 24 дні тому

      you can make the line_items array dynamic. Create a model that will hold the price, and then you can reference the price_id in the line items:
      'line_items': [
      {
      'price': price.price_id,
      'quantity': 1,
      },
      ],

  • @joaoarthurbandeira
    @joaoarthurbandeira 9 місяців тому

    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!

  • @shivamkumar-qp1jm
    @shivamkumar-qp1jm 5 місяців тому

    What about monthly subscription plan or yearly subscription plan

  • @mars.automarketing
    @mars.automarketing 7 місяців тому

    Great video. I would really love to see a complete subscriptions implementation for SaaS. I really can't find a full tutorial

  • @naeemchaudry733
    @naeemchaudry733 Рік тому

    the payment information will save in our database for admin to check after this ?

  • @shareefmhd1189
    @shareefmhd1189 9 місяців тому

    is it necessary to create product in stripe?
    what if i have 1000+ products in my ecommerce website..!?

    • @vladimirnicolescu1342
      @vladimirnicolescu1342 3 місяці тому

      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

  • @kemosabe5120
    @kemosabe5120 4 місяці тому

    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.

  • @no-binary_dragonknight
    @no-binary_dragonknight 8 місяців тому

    Thank u very much, great tutorial🙃

  • @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 Рік тому +1

      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.

  • @themarksmith
    @themarksmith 7 місяців тому

    Well explained thanks!

  • @kitamashi
    @kitamashi 7 місяців тому

    Very good video, thank you. Also, I love the keyboard, sounds like an asmr

  • @AyushKumar-po8no
    @AyushKumar-po8no Рік тому +13

    That keyboard sound is super irritating!!

    • @JohnCalentine
      @JohnCalentine Рік тому

      At least they are not blue switches. I prefer the switches you hear over clicky blues

    • @extorrote
      @extorrote 3 місяці тому

      Really?
      instead of saying thank you?
      What an ungrateful thing you are.

  • @ThatWeirdKiidOnYT
    @ThatWeirdKiidOnYT 9 місяців тому

    That's a really cool Gameboy

  • @AlexanderKurguzkin
    @AlexanderKurguzkin 9 місяців тому

    Thanx, very useful!

  • @candai1996
    @candai1996 Рік тому

    Great video!

  • @IvanBalloon
    @IvanBalloon Рік тому +1

    Thanks!

  • @tomahocbc8228
    @tomahocbc8228 Рік тому

    thanks for this amazing content, please can do it on the PayPal server side, not the client side?

    • @djangoroad
      @djangoroad  Рік тому +1

      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 ua-cam.com/video/8rMfW4wO-vU/v-deo.html&ab_channel=DennisIvy

    • @djangoroad
      @djangoroad  Рік тому +1

      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.

  • @fbaugusto
    @fbaugusto 10 місяців тому

    Thanks! :)

  • @aashayamballi
    @aashayamballi Рік тому

    Thank you!

  • @mariocortes2670
    @mariocortes2670 8 місяців тому

    Awesome!

  • @jaecheokkim99
    @jaecheokkim99 Рік тому +2

    video is very useful, but sound of keyboard is quite loud. The sound is a bit distracting.

    • @djangoroad
      @djangoroad  Рік тому +2

      useful feedback, thanks

    • @kuindjinho
      @kuindjinho Рік тому

      🤣smart reply i love it thanks for the video@@djangoroad

  • @kay8379
    @kay8379 8 місяців тому

    thank you!!!