Duplicate Webhook Data

I’m receiving webhooks from Stripe upon completion of a successful Invoice payment.

I created two webhook endpoints in Stripe, which results in duplicate data.

In Bubble, I’m detecting the webhook data, and creating a new Invoice object in my database, only when an Invoice (filtered by ID) doesn’t exist.

However, because both webhooks are being sent at the same time, it seems both “Create Invoice: when Search for Invoice: Count <= 0” are returning false, and therefore, I’m creating multiple invoice objects on my end.

I have ran into this duplicate data issue on Bubble too many times to count, and I’d love to hear if anyone has a solution.

Yeah, super annoying (particularly Stripe which seems to ping you webhooks with abandon).

There was an interesting solution here …

Thanks for the link… I’ll have a look at this with fresh eyes tomorrow and build some complicated work around.

Bubble Team… why is a lack of data integrity being regarded as an acceptable bug?

If I tell Bubble to make a thing, only when a thing with that ID doesn’t exist, and Bubble makes two, that represents an insanely critical issue.

That is how cloud databases tend to work. People try to architect around it.