I’m currently in the process of building API workflows for Stripe Webhook events for a SaaS product and wanted to see if anyone had best practices to recommend. A couple of questions I have are:
Which events should a SaaS company have setup in Stripe to help manage subscriptions and payments?
Is it a best practice to have an API for each event? Or one API that triggers other workflows dependent upon the event type?
I’m open to any and all feedback on this topic. Thanks in advance.
It seems that when I try to initialize a webhook Stripe endpoint, I can only automatically initialize just one event to send, and not combine them into one API endpoint. Unless I’m missing something, it seems weird to me that Stripe lets you create a webhook, then lets you choose numerous events to send, but when it comes to initializing an event, it only lets you choose one. If I then choose another event to send and initialize that one, it then erases the previous initialization data points, replacing them with the current single event.
So it seems to me that one would need a Stripe API endpoint in Bubble to cover every possible event such as ‘charge.captured’ and another endpoint for ‘charge.dispute.closed’ and another for ‘charge.failed’.
Seems like my backend workflows would become bloated with tons of potential Stripe events.
Correct me if I’m wrong.
I use multiple backend workflows for each event that I need to watch for. While it sounds complicated, if you try to capture every event you need under one backend workflow then that workflow will end up being very very complex. I have one workflow for subscription.deleted - this then does actions specific to when a user subscription is deleted. Then another one for creating subscriptions, which has it’s own user actions. You want to keep big things like that under different workflows.
OK, thanks @ramzizi for the clarification on that. It’s really not a big deal to me to have multiple individual endpoints. I was just confused because Stripe lets me choose a dozen at once and I didn’t know if it was initializing ALL of them, or just the single one that I choose.
I’ll create an endpoint for each event I need to monitor then.