Add Stripe subscriptions to Django in 7 mins 💵

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ย. 2024

ความคิดเห็น • 35

  • @alexdin1565
    @alexdin1565 4 หลายเดือนก่อน +4

    the most amazing TH-cam channel
    please Tom, add another one about Paypal because some countries can't open stripe accounts, please add server payment I watch the video from Dennis Ivey he did client integration and he said the next time will do the server part and he didn't

    • @francosbenitez
      @francosbenitez 4 หลายเดือนก่อน +2

      Totally agree. I'd be awesome to have the PayPal integration. In my country, Stripe doesn't work either.

    • @tomdekan
      @tomdekan  4 หลายเดือนก่อน +1

      Good idea - thanks Alex and Francos 🙂

  • @themarksmith
    @themarksmith 4 หลายเดือนก่อน +1

    Excellent content - love the written guide too... you deserve many more subs!

    • @tomdekan
      @tomdekan  4 หลายเดือนก่อน

      Much appreciated Mark!

  • @pm1234
    @pm1234 4 หลายเดือนก่อน +4

    Great django pipeline, thank you! Just a few questions (for a future tutorial?):
    - when a user subscribed, how to change this user boolean setting (subscribed field)?
    - when the user cancels his subscription, how the stripe server would call your server using the webhook to turn the subscirbed field to false?

    • @tomdekan
      @tomdekan  4 หลายเดือนก่อน +1

      You're welcome! Here are the answers:
      q. when a user subscribed, how to change this user boolean setting (subscribed field)?
      a. You'd change the user to is_subscribed your view that the stripe webhook calls. If you see the written guide, I'm doing this in the _update_record function, setting `has_access` to True under the 'checkout.session.completed' condition.
      q. when the user cancels his subscription, how the stripe server would call your server using the webhook to turn the subscirbed field to false?
      a. In the same way as above, stripe will call your endpoint. If you see the written guide, I'm doing this in the _update_record function, setting `has_access` to False under the 'customer.subscription.deleted' condition.

    • @pm1234
      @pm1234 4 หลายเดือนก่อน +1

      @@tomdekan OK, thank you! Didn't see the written guide in the description 🤦‍♂

    • @pm1234
      @pm1234 4 หลายเดือนก่อน +1

      @@tomdekan May I ask why you didn't go with oscar or else?

    • @tomdekan
      @tomdekan  4 หลายเดือนก่อน

      ​ @pm1234 Of course - please ask any question you'd like.
      My approach is to use the lightest, fastest approach first, only adding the features I need.
      If I need more features (often I don't), I would add the extra features, perhaps by adding a package.
      This applies to DjOscar and Dj-stripe regarding adding Stripe.

    • @pm1234
      @pm1234 4 หลายเดือนก่อน +1

      @@tomdekan Makes total sense, thank you!

  • @thetechtimes
    @thetechtimes 2 หลายเดือนก่อน +1

    Thank you Tom, I was looking for how can add subscriptions in my django app.

    • @tomdekan
      @tomdekan  2 หลายเดือนก่อน

      Very happy to help 🙂 What app are you building?

    • @thetechtimes
      @thetechtimes 2 หลายเดือนก่อน +1

      @@tomdekan I am building a SaaS base ERP for SME's

    • @tomdekan
      @tomdekan  หลายเดือนก่อน

      Got it. Try checking out my video on adding stripe subscriptions to Django as a starting point

  • @chathumijanandhi
    @chathumijanandhi 3 หลายเดือนก่อน +1

    Sir, without using webhooks can I store stripe payments data in mysql

    • @tomdekan
      @tomdekan  3 หลายเดือนก่อน

      No. Regardless of the database, you'll need to use webhooks. Stripe will communicate with the payment method that your customer is using, and then send the data to your server with a webhook. Without receiving a webhook, Stripe can't tell your server that the customer has paid.

  • @jacojames
    @jacojames 4 หลายเดือนก่อน +1

    Commenting for the algo! Appreciate you sir!

    • @tomdekan
      @tomdekan  4 หลายเดือนก่อน +1

      I appreciate you too!

  • @Good-and-Geeky
    @Good-and-Geeky 4 หลายเดือนก่อน +1

    Thanks Tom - You're a star...

    • @tomdekan
      @tomdekan  4 หลายเดือนก่อน

      Thanks Dave! ⭐️

    • @Good-and-Geeky
      @Good-and-Geeky 4 หลายเดือนก่อน

      @@tomdekan I did struggle with it. Trying on a fairly basic Django set up and failed. I’ll try again with the bare minimum Django project. Probably need to run at half speed too the screens were jumping around all over the place.
      I’ll let you know how I get on.

    • @tomdekan
      @tomdekan  4 หลายเดือนก่อน

      @@Good-and-Geeky Thanks for the feedback Dave - there are lots of elements.
      Have you had a look at the written guide? That might be easier to follow if there's too much jumping for you.

  • @Cyrixau
    @Cyrixau 4 หลายเดือนก่อน +1

    Nice tutorial! Any plans on a tutorial to 'manage your billing information' in a profile page instead of stripe's external link? I started doing it this month and didn't realise how complex it can get.

    • @tomdekan
      @tomdekan  4 หลายเดือนก่อน

      You're welcome and interesting idea. What are you building with the profile page?

    • @Cyrixau
      @Cyrixau 4 หลายเดือนก่อน +1

      @@tomdekan Sorry I meant profile page like a settings page with a billing section. Just for a SaaS but have come across all these little details that I need to keep in mind such as changing plans, not allowing the user to change to the current plan, cancellation etc then updating the db since the user might be on free version.
      Going through the user flow and always finding something I'm missing 😭😭

  • @YannAriell
    @YannAriell 3 หลายเดือนก่อน

    Great. But i have a question about deployement. How works webhook in production ?

    • @tomdekan
      @tomdekan  3 หลายเดือนก่อน

      Sure. The webhook will send data to an endpoint on your Django server. Let me know if you’d like to ask anything else

    • @legion_prex3650
      @legion_prex3650 2 หลายเดือนก่อน +1

      hey, you need an working endpoint in production. then it's the same like in dev.

  • @sherklan
    @sherklan 3 หลายเดือนก่อน +1

    thanks bro

    • @tomdekan
      @tomdekan  3 หลายเดือนก่อน

      You're welcome Sherklan 🙂