Bubble's 'only when' logic often failing

Anyone else often frustrated by trying to get the ‘only when’ functions to work? I’m looking to make changes to a users credits but only when the Stripe webhook response for “paid” is “true”. In the Stripe dev log it clearly says ‘false’ (+ it’s my own card, there’s no charge), however Bubble still updates my users credits.

It clearly does detect the webhook response because when the response contains ‘5000’ for ‘amount’, it adds 500 credits while for an amount of ‘10000’ it adds 1200 credits.

Anyone else has this issue at times?

image

Some currencies are zero-decimal currencies but not all of them.

https://stripe.com/docs/currencies

All API requests expect amounts to be provided in a currency’s smallest unit. For example, to charge 10 USD, provide an amount value of 1000 (i.e., 1000 cents).

Check your server logs to see whats exactly happening.

1 Like

Thanks, the amount of being recognized just fine. It’s the true/false values it isn’t recognizing. I’ve tried setting it up in 3-4 different ways but it’s still adding credits to my user even when the payment has failed.

The best steps to get to the main issue is to check your Server logs and to zoom in on each workflow to see which conditions are triggered. Can you make better screenshots of the overall configuration on the back-end?

Are you experiencing this when the “only when” is within the action? I have experienced problems with this in the past and found complete reliability if I include the “only when” within the event as opposed to the action. It is hugely annoying and less efficient, but seems to get it done.