-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What does the new Stripe Billing mean for Pinax Stripe? #558
Comments
@iMerica That's a great question. Was just seeing Billing this weekend but haven't had time to digest it all. |
@paltman Any thoughts on this? |
@hgezim still haven't had time to investigate |
@paltman Any plans to investigate? |
@paltman @blueyed pinax-stripe's API is back at 2015. Since then, Stripe has performed 20+ new releases of the API, 3 of which were major and broke the API. One of them, released 6 months ago, was a substantial break as it split a model. I am available to provide a PR, provided you have not already started to work on that and the PR is welcome. This will address issues #558 #571 #572 , and perhaps more. I'd like to double-check this with you explicitly because the change is extensive: API version 2018-02-05 in particular splits Plans into Products and Plans, so this change will go all the way to models. |
I spent a few hours studying Stripe Billing and speaking with their sales team. The short version is that I think this package is mostly obsolete other than providing some helpful webhooks endpoints. In the Stripe Billing universe, all of these data models live in Stripe. The only thing you need in your local Django app is the Stripe Customer ID which you can use to get related data like cards, invoices, subscriptions etc using the official Stripe Python client. To me the choice is clear: Use the official Stripe Python client to interact with latest/greatest data on Stripe's servers. Not worry about API version upgrades or synchronizing state. vs Use the models in Pinax Stripe to interact with potentially stale data in your local database and worry about API version changes, dunning and other things that are handled on your behalf with Stripe Billing. |
Thanks for your insights, @iMerica. However, I think pinax-stripe could then be considered obsolete / not necessary before already, since everything lived in Stripe already, and could be accessed using stripe-python already. But I agree that it is quite a hassle in general, and that the project is lacking maintenance manpower. We've started using it, and did a lot of work for the Connect part, but still have a bunch of changes that we have to track in our own branch/fork. The project certainly would need some serious cleanup, e.g. with regard to bitcoin (not supported anymore), cards etc. There is also #525 in an attempt to update the API already, but it got no feedback from the maintainer(s) since November last year. |
I basically have to agree with iMerica. This app, like all django app, attempts to bring the Stripe world into django. Stripe has a knack for updating their API multiple times a year, including breaking changes. Making the two worlds coexist requires quite substantial maintenance manpower, which is mostly a waste of energy, and would unlikely be welcome by website developers (think 5 database schema changes per year). Sticking with older versions of the API, at the same time, is not really an option, since it's a pain for new users, who create an account set by default with new API version, and which cannot be reverted. I finally made a small app which makes bare-minimal assumptions on the stripe's API:
Looking back at the history of changes at Stripe's API, this approach would have survived the past multiple years, except for the tectonic data model break from 2017-04-06 . |
@mmic |
Just for reference, there are plans for an upcoming sprint / discussion about backward compatiblity at #594. |
I have been thinking a lot about this recently. The maintenance cost of having all the data modeled for caching purposes is very high. It makes me wonder if we shouldn't consider getting rid of basically all models except for the I do believe caching is important for good web application performance, but it seems like it might be far better to be a site builder decision than something done generically in the app. |
Sounds good to me. |
That's an interesting proposition and would significantly lower the amount of code we needed to maintain. A big reason a lot of the actions were written was to wrap the I don't want to rush into this decision because it's going to be a massive amount of work and have significant impact for how this app is integrated with (will actually increase the burden on site developer but I also think give more freedom). |
And what we are talking about is much broader than the title of this issue now. This isn't just about |
Just browsing through the code and I think we can kill 90% or more of the actions, there might be a couple that are more "utility" type functions we can keep or move to I also think we get rid of all the views except for the Webhook view since the views depend on the models. We could eventually add back a set of base class Views meant to be extended but the views/templates have been hard to maintain as well and seem to be very site specific. I'll continue to think on this and maybe start a wiki page with a plan but would love other's input on this as well. I'm pretty excited about the new direction as I think it's going to make this leaner, easier to maintain, and give the site developer more power. |
Hi,
Can you let me know what the plan is for Pinax Stripe? It looks like some of Stripe's entities and relationships have changed as well as the API itself.
See https://stripe.com/docs/billing/migrating.
Thank you!
The text was updated successfully, but these errors were encountered: