#bishwasbh-checkout-subs

1 messages ยท Page 1 of 1 (latest)

brisk pathBOT
sacred python
#

@fringe hamlet Please respond here and not in the main channel

fringe hamlet
#

I am so sorry

#

Do you want me to delete that post?

#

@sacred python You human, right?

sacred python
#

Yup!

#

Copy pasting what you have so I can keep it in one place:
Hello Devs, I am working on a SaaS project with Django, django-ninja and SvelteKit. I have developed a system that allows users to buy 1 credit per $1, which is working, but there are some default_product_id values I have added in the settings, but it feels somehow faulty.

Leaving the already-developed system aside, I wanna develop a way that allows users to buy multiple packages, along with the 1 credit per $1, how can I implement Stripe with Django for that? Do I have to create checkout sessions and all for that?

Please forgive my lack of knowledge. What could be the best implementation, a robust one ๐Ÿ™‚
With our current system users can buy 1 credit for 1 dollar. I am using stripe.checkout.Session.create to create a one-time payment session.

https://i.imgur.com/NfeoeDd.png

And I am using checkout.session.completed to find out who paid for it, and assign the credits.

https://i.imgur.com/NploUSX.png

But, for the recurring payments, I dunno how can I track user's info, like the id, and assign the credits to the actual user.

fringe hamlet
#

Awesome. I believe, you're willing to help me out here, am I right?

sacred python
#

Yup, I can give you some pointers

#

You're basically just asking how to use Checkout Sesions to create Subscriptions, right?

fringe hamlet
#

Yes. And how to get the users info in webhook when the monthly subscription gets paid ๐Ÿ™‚

sacred python