#bishwasbh-checkout-subs
1 messages ยท Page 1 of 1 (latest)
@fringe hamlet Please respond here and not in the main channel
I am so sorry
Do you want me to delete that post?
@sacred python You human, right?
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.
Awesome. I believe, you're willing to help me out here, am I right?
Yup, I can give you some pointers
You're basically just asking how to use Checkout Sesions to create Subscriptions, right?
Yes. And how to get the users info in webhook when the monthly subscription gets paid ๐
Have you read through https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=stripe-hosted yet? It has a full end to end guide on how to use Checkout w/ Subscriptions
Once you've got that working, you'll want to read https://stripe.com/docs/billing/subscriptions/webhooks to understand which webhooks to use