Stripe Webhooks Back End Workflows intermittently updating data

Hello,

I have two webhooks with back end workflows.

One: listens for checkout and creates a new customer (guest)

Two: listens for charges and updates the customer data with the receipt URL using the payment intent.

This only works sometimes which is frustrating.

I think it’s because both wfs run at the same time.

Any ideas/solutions would be appreciated.

you can just run these calls as data apis and return and save the data to the database without a webhook? if you do that then you can force the order of operations

if you want to keep the webhooks you could do a forward pass for the one that needs to run after the first one - just reschedule it on another api workflow for a few seconds in the future

for stripe I setup the customer and order when they initiate checkout process (runs in backend) so by the time they get to the payment page it is ready to go (otherwise there is a few seconds delay before the payment module shows). on order completion I send the data to the backend and then use data apis to store the necessary information.

Thanks Mitch.

I don’t know how I could do away with the webhooks as they are listening for charge and checkout.

What do you mean by forward pass?

I created a workflow that writes the guest receipt URL when the webhook misses it. This is working for now.

I’m not sure if the workflows aren’t running because they are triggered at the same time. What we usually mitigate is the race condition in case they update the same thing.

Have you compared the Stripe log with the Bubble log?

I would simply make a ( yes/no) field defaulted to NO.
When the first workflow is done mark this field as YES.
Second workflow, put a condition…
Only when, ( THAT FIELD IS YES).
Not 100% sure if that will prevent the 2nd workflow completly to run as maybe everytime the condition won’t be met, but defintley i would give it a shot