Supporting the Stripe Subscription Life Cycle
Now that we have a mechanism in place to capture Stripe events, we need to decide what events we should actually handle. And in order to decide that, we need to look at what events Stripe will send.
There is a set of events that Stripe sends to initialize a new subscription and a set of events that are sent around each new subscription payment. Most of these events we don’t really care about, but Stripe sends them anyway (if we want, the Stripe administrative dashboard has a setting to limit the events being sent).
When we initially create our subscription via our workflow, Stripe should trigger two events:
- customer.created
- customer.subscription.created
At the end of the trial period, or immediately ...
Get Take My Money now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.