#panpetar
1 messages · Page 1 of 1 (latest)
Hello panpetar, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
• panpetar-account-support, 1 hour ago, 2 messages
Thank you. Please leave thread opened, i will have few more questions
if (event.request != null) {
// handle a subscription canceled by your request
// from above.
} else {
// handle subscription canceled automatically based
// upon your subscription settings.
}
break```
I found this snippet in the docs.
1. Once subscription ends, will I receive this event ?
Yes
so
- if condition -> handles when user cancels subscription using feature on my website "cancel subs"
- else -> in case payment fails else will happen ?
Are these 2 statments correct ?
- It's when your backend sends a request to cancel. I don't know in which cases this happens, so I can't confirm your statement.
- It's when it was cancelled automatically, e.g. it ran for the specific number of cycles, or the customer didn't pay so the Subscription was cancelled according to your Dashboard settings.
What is difference between these 2 ? You can provide docs if exists.
Thank you for help vanya. I am probably tiring but I really need this infos to finish an app
You can read more about statuses here: https://stripe.com/docs/invoicing/overview#invoice-statuses
What's the best way to track when a subscription is renewed?
I store in my db only expirationDate, so once it is paid I want to update it,
👋 stepping in here as vanya needs to step away
The customer.subscription.updated Event is generally the best one to track renewals as it will fire every time a renewal occurs.
You can take a look at https://stripe.com/docs/billing/subscriptions/webhooks if you haven't yet for the different Events and what you should use them for.