2
8 Comments

Implementing Stripe Billing with Django

Does anyone has experience setting up Stripe workflows with Django? I have been trying to implement the whole billing process and failing for weeks. Would greatly appreciate any help. Thanks a ton in advance.

on December 30, 2019
  1. 3

    @rasulkireev I've been through this pain several times and have recently built all of this functionality into https://www.saaspegasus.com/ to make it easy for anyone else who wants to do it.

    I also took my learnings and put them together in this Guide to Creating a Subscription SaaS Application with Django and Stripe so you can do it yourself. Hope that helps and happy to answer any questions!

    1. 1

      I found your project many months ago, and am happy to see it grow and improve every time I check it out. Nice job on it!

      In fact @czue, I think you were the first indiehacker I followed here. I did a quick search on Django and your post showed up. I've been a fan of your work for a while now. Loved the podcast :)

      Apart from getting the actual functionality, this is a great learning experience for me, which is why I didn't give saaspegasus a try.

      I'm still in a process of figuring it out (had a little break from the project) and will also share my learnings, if any in a blog post. Can't wait for yours!

  2. 2

    Hey Rasul,

    I am happy to help. You can reach me on my profile page contact details or we can keep this thread going.

    What have you tried so far? Are you using dj-stripe or a similar package?

  3. 1

    What are you trying to achieve? Do you want to manually move invoices through its statuses?
    What problems did you run into?

    1. 1

      My use case is simple. Ask user to pay monthly to maintain specific permissions. I was able to setup django-stripe, but the Payment Intent API screwed me. Ended up removing django-stripe as it was to bloated for my use case, but the Payment Intent is still not totally clear to me. Currently implementing simple checkout.js script. Whoever makes a one time purchase, gets the permission. Hopefully that answers your question, if not please let me know.

      P.S. Sorry for a slow reply.

      1. 1

        In first sentence you are mentioning monthly payments to maintain permissions. Then you say whoever makes one time purchase, gets the permission.

        You either need subscriptions or one time payments.
        After successful payment you can store the permission somewhere in your database.
        If you have recurring payments - a subscription - you need to implement stripe webhooks, to listen when users cancel/expire their subscription, and then you can revoke their permission.

        Anyway, your use case is not totally clear to me, so it's hard to give any specific advice.

        1. 1

          I wanted to build a subscription workflow with Django and Stripe. I failed. For the time being I wrote a much simpler process of one time payment. This is only temporary, I do want to switch to subscription model.

          Webhook and Payment Intents is exactly where I am failing, which is why I posted here (I couldn't find any good tutorials). I am not looking for a specific answer here in the comments. Rather, I am looking if someone has the time and the willingness to help.

          Do you think you could help me with that? I just can't wrap my head around all the webhooks, intents stuf. I would really appreciate your time. Thanks in advance.

          1. 1

            So what specifically are you looking for? Someone to implement it for you? I offer freelancing services, so if you want, you can book a call via https://krevh.com and we can discuss it. I've implemented Stripe subscriptions with web hook support recently.