Has anyone been able to successfully resolve a Stripe webhook through the “Return data from API” action? Or could anyone give some insight on exactly when and how the success code is sent to Stripe after a workflow is finished?
I have an API workflow triggering from Stripe’s invoice.created webhook, and for some users, the workflow takes a while, and the Stripe webhook times out and retries, triggering the workflow again. I’m trying to respond with a status:success JSON pair immediately when the workflow begins as seen below, but the webhook still keeps retrying for a few users where the workflow takes a while. Any advice? Thanks.
The workflow previously ended with a conditional “Schedule workflow on a list” action, which I’ve seen cause some hangups before, so I added a “Terminate this workflow” at the end to see if it changes anything.
The issue was in fact having the workflow end on a conditional “Schedule API Workflow on a list” action, which was preventing the workflow from terminating properly and returning a success code to Stripe.
This is the second time a conditional scheduling action has caused issues with external services by failing to terminate properly, so I’ll be submitting a bug report for further awareness.
When dealing with webhooks, I’ve had good luck by simply writing the data from the webhook to a databas thing, and then scheduling an api process and passing it the db entry just created. This way I have a clear log of webhooks, and can re-run them if needed, along with offloading the processing from the request.