the most amazing TH-cam channel please Tom, add another one about Paypal because some countries can't open stripe accounts, please add server payment I watch the video from Dennis Ivey he did client integration and he said the next time will do the server part and he didn't
Great django pipeline, thank you! Just a few questions (for a future tutorial?): - when a user subscribed, how to change this user boolean setting (subscribed field)? - when the user cancels his subscription, how the stripe server would call your server using the webhook to turn the subscirbed field to false?
You're welcome! Here are the answers: q. when a user subscribed, how to change this user boolean setting (subscribed field)? a. You'd change the user to is_subscribed your view that the stripe webhook calls. If you see the written guide, I'm doing this in the _update_record function, setting `has_access` to True under the 'checkout.session.completed' condition. q. when the user cancels his subscription, how the stripe server would call your server using the webhook to turn the subscirbed field to false? a. In the same way as above, stripe will call your endpoint. If you see the written guide, I'm doing this in the _update_record function, setting `has_access` to False under the 'customer.subscription.deleted' condition.
@pm1234 Of course - please ask any question you'd like. My approach is to use the lightest, fastest approach first, only adding the features I need. If I need more features (often I don't), I would add the extra features, perhaps by adding a package. This applies to DjOscar and Dj-stripe regarding adding Stripe.
No. Regardless of the database, you'll need to use webhooks. Stripe will communicate with the payment method that your customer is using, and then send the data to your server with a webhook. Without receiving a webhook, Stripe can't tell your server that the customer has paid.
@@tomdekan I did struggle with it. Trying on a fairly basic Django set up and failed. I’ll try again with the bare minimum Django project. Probably need to run at half speed too the screens were jumping around all over the place. I’ll let you know how I get on.
@@Good-and-Geeky Thanks for the feedback Dave - there are lots of elements. Have you had a look at the written guide? That might be easier to follow if there's too much jumping for you.
Nice tutorial! Any plans on a tutorial to 'manage your billing information' in a profile page instead of stripe's external link? I started doing it this month and didn't realise how complex it can get.
@@tomdekan Sorry I meant profile page like a settings page with a billing section. Just for a SaaS but have come across all these little details that I need to keep in mind such as changing plans, not allowing the user to change to the current plan, cancellation etc then updating the db since the user might be on free version. Going through the user flow and always finding something I'm missing 😭😭
the most amazing TH-cam channel
please Tom, add another one about Paypal because some countries can't open stripe accounts, please add server payment I watch the video from Dennis Ivey he did client integration and he said the next time will do the server part and he didn't
Totally agree. I'd be awesome to have the PayPal integration. In my country, Stripe doesn't work either.
Good idea - thanks Alex and Francos 🙂
Excellent content - love the written guide too... you deserve many more subs!
Much appreciated Mark!
Great django pipeline, thank you! Just a few questions (for a future tutorial?):
- when a user subscribed, how to change this user boolean setting (subscribed field)?
- when the user cancels his subscription, how the stripe server would call your server using the webhook to turn the subscirbed field to false?
You're welcome! Here are the answers:
q. when a user subscribed, how to change this user boolean setting (subscribed field)?
a. You'd change the user to is_subscribed your view that the stripe webhook calls. If you see the written guide, I'm doing this in the _update_record function, setting `has_access` to True under the 'checkout.session.completed' condition.
q. when the user cancels his subscription, how the stripe server would call your server using the webhook to turn the subscirbed field to false?
a. In the same way as above, stripe will call your endpoint. If you see the written guide, I'm doing this in the _update_record function, setting `has_access` to False under the 'customer.subscription.deleted' condition.
@@tomdekan OK, thank you! Didn't see the written guide in the description 🤦♂
@@tomdekan May I ask why you didn't go with oscar or else?
@pm1234 Of course - please ask any question you'd like.
My approach is to use the lightest, fastest approach first, only adding the features I need.
If I need more features (often I don't), I would add the extra features, perhaps by adding a package.
This applies to DjOscar and Dj-stripe regarding adding Stripe.
@@tomdekan Makes total sense, thank you!
Thank you Tom, I was looking for how can add subscriptions in my django app.
Very happy to help 🙂 What app are you building?
@@tomdekan I am building a SaaS base ERP for SME's
Got it. Try checking out my video on adding stripe subscriptions to Django as a starting point
Sir, without using webhooks can I store stripe payments data in mysql
No. Regardless of the database, you'll need to use webhooks. Stripe will communicate with the payment method that your customer is using, and then send the data to your server with a webhook. Without receiving a webhook, Stripe can't tell your server that the customer has paid.
Commenting for the algo! Appreciate you sir!
I appreciate you too!
Thanks Tom - You're a star...
Thanks Dave! ⭐️
@@tomdekan I did struggle with it. Trying on a fairly basic Django set up and failed. I’ll try again with the bare minimum Django project. Probably need to run at half speed too the screens were jumping around all over the place.
I’ll let you know how I get on.
@@Good-and-Geeky Thanks for the feedback Dave - there are lots of elements.
Have you had a look at the written guide? That might be easier to follow if there's too much jumping for you.
Nice tutorial! Any plans on a tutorial to 'manage your billing information' in a profile page instead of stripe's external link? I started doing it this month and didn't realise how complex it can get.
You're welcome and interesting idea. What are you building with the profile page?
@@tomdekan Sorry I meant profile page like a settings page with a billing section. Just for a SaaS but have come across all these little details that I need to keep in mind such as changing plans, not allowing the user to change to the current plan, cancellation etc then updating the db since the user might be on free version.
Going through the user flow and always finding something I'm missing 😭😭
Great. But i have a question about deployement. How works webhook in production ?
Sure. The webhook will send data to an endpoint on your Django server. Let me know if you’d like to ask anything else
hey, you need an working endpoint in production. then it's the same like in dev.
thanks bro
You're welcome Sherklan 🙂