Giter VIP home page Giter VIP logo

django-stripe-subscriptions's Introduction

Setting up Stripe subscriptions with Django

Want to learn how to build this?

Check out the post.

Want to use this project?

  1. Fork/Clone

  2. Create and activate a virtual environment:

    $ python3 -m venv venv && source venv/bin/activate
  3. Install the requirements:

    (venv)$ pip install -r requirements.txt
  4. Apply the migrations:

    (venv)$ python manage.py migrate
  5. Add your Stripe test secret key, test publishable key, endpoint secret and price API ID to the settings.py file:

    STRIPE_PUBLISHABLE_KEY = '<your test publishable key here>'
    STRIPE_SECRET_KEY = '<your test secret key here>'
    STRIPE_PRICE_ID = '<your price api id here>'
    STRIPE_ENDPOINT_SECRET = '<your endpoint secret here>'
  6. Run the server:

    (venv)$ python manage.py runserver

django-stripe-subscriptions's People

Contributors

amirtds avatar duplxey avatar mjhea0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-stripe-subscriptions's Issues

Failed to POST

After confirming a successful checkout session in Stripe CLI:

2021-02-14 16:07:09   --> charge.succeeded [evt_1IKn7pEXbllwxHYyjkUh1Ay2]
2021-02-14 16:07:09   --> checkout.session.completed [evt_1IKn7pEXbllwxHYybifIpqaZ]
2021-02-14 16:07:09   --> payment_method.attached [evt_1IKn7pEXbllwxHYyEJt699Wm]
2021-02-14 16:07:09   --> customer.created [evt_1IKn7pEXbllwxHYy6JPUahjJ]
2021-02-14 16:07:09   --> invoice.created [evt_1IKn7pEXbllwxHYyXN9Euq0e]
2021-02-14 16:07:09   --> invoice.updated [evt_1IKn7pEXbllwxHYyI37PQcHn]
2021-02-14 16:07:09   --> invoice.updated [evt_1IKn7pEXbllwxHYyUiFNmbNn]
2021-02-14 16:07:10   --> customer.subscription.updated [evt_1IKn7pEXbllwxHYyglzzRLnz]
2021-02-14 16:07:10   --> customer.subscription.created [evt_1IKn7pEXbllwxHYyvP8PZQrR]
2021-02-14 16:07:10   --> invoice.finalized [evt_1IKn7pEXbllwxHYyhjlR2wHJ]
2021-02-14 16:07:10   --> invoice.paid [evt_1IKn7pEXbllwxHYySRPBrBNz]
2021-02-14 16:07:10   --> invoice.payment_succeeded [evt_1IKn7pEXbllwxHYyqaC4W8Ks]
2021-02-14 16:07:10   --> invoice.updated [evt_1IKn7qEXbllwxHYyEBuJx8FJ]
2021-02-14 16:07:10   --> payment_intent.created [evt_1IKn7qEXbllwxHYymPKkRKU7]
2021-02-14 16:07:10   --> payment_intent.succeeded [evt_1IKn7qEXbllwxHYydqUDCig0]

Stripe doesn't seem to POST back to my StripeCustomer model (note I have my webhook endpoint at app/webhook):

2021-02-14 16:07:39 [ERROR] Failed to POST: Post http://locahost:8000/app/webhook: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2021-02-14 16:07:39 [ERROR] Failed to POST: Post http://locahost:8000/app/webhook: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2021-02-14 16:07:39 [ERROR] Failed to POST: Post http://locahost:8000/app/webhook: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
...

I have followed the TestDriven guide closely and cannot see an obvious error on my part. However, it does look like I may have forgotten something crucial. Could someone suggest where I could start focussing my debugging as I'm quite stuck at the moment.

Thanks!

Thank you!

I could not find another way to thank you, hope you don't mind. I used your walk-thru and code, it was well explained and did just what I needed. I just wish I found it sooner.

Inquiry About Your Django Content and Projects

Dear Nik Tomazic,

I hope this message finds you well. I am writing to express my admiration for your excellent work on Django projects and the valuable content you share with the community. Recently, I had the pleasure of reading your insightful post on customizing the Django admin interface, which I found immensely helpful (link to article).

I am particularly interested in your django-stripe-subscriptions repository. I am considering using it for an upcoming project and would like to know if you have plans to update it to ensure compatibility with the latest developments in 2024. Additionally, could you please advise if the current version is safe to use in my project?

Thank you for your time and contributions to the Django community. I look forward to your response.

Best regards,
Ali

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.