@moesaid well as the documentation says, I will follow it. Create endpoints in my project for each webhook that Stripe provides.. set the URL's on the Stripe dashboard and do whatever needs to be done in my application. For example, if a customer deleted the subscription I will revoke his/her access to my platform by setting a timestamp field when it should expire, and I will either check for that in the login, or will setup a middleware.
Same for the other webhooks, depends on the system always but I will make endpoints for those that I am interested in, and perform an action whenever necessary.
@nakov the thing is not that clear for me yet, when the user subscribes and then his membership renewed automatically
without user interfere, do stripe notify my server?
Then you add your URL from your web application and the endpoint you want to accept webhooks from stripe on, and you add the events for which you want Stripe to notify you:
https://imgur.com/N92i6T5.
didn't find something related to renewing or so but thought about using the invoice hook as every new subscription payment done stripe make an invoice for,
what do you think is the best hook to use if I am looking for the subscription renew event (2nd, 3rd, 4th payment, etc.)