Stripe has an associated event for everything that happens with a subscription. (There’s actually dozens of events that occur when using Stripe, not all of which are specific to subscriptions.)
For our example of a new customer with a valid payment method and no trial period, here’s the lifecycle in events:
charge.succeeded(immediate attempt for the first invoice)
invoice.created(after the subscription period is up)
charge.succeeded(approximately one hour later)
- Go back to Step 6.
When certain events occur, you should listen for the associated webhooks and take corresponding steps on your website (e.g., extending the length of time that a customer can use your site, or terminating access when a subscription is canceled).