I just had a weird problem where sometimes stripe.js Stripe Tokens were just not being created. The “Convert Card Into Stripetoken” action was not being triggered, even though it was clearly there in the workflow. Hence the “When Stripetoken couldn’t be created” or “When stripetoken for a card has been created” events were never occuring.
After a lot of experimentation, I came to realise this was because I’d placed the stripetoken element inside a group that was hidden.
So beware fellow Stripe.js users - your stripetoken element, although invisible in your app, must be in a visible part of your page to function!
Thanks for sharing! This is a known Bubble concept that applies to custom plugin elements as well: if you don’t have an element loaded (as opposed to ‘visible’) on the page, you won’t be able to use it.
Thanks for the reply @copilot!
Okay, I see what you mean. I had the group containing the stripetoken element invisible on page load. Since Bubble only loads the items which are required on page load, then my group, and therefore my stripetoken element, had not been loaded at that point. As soon as I made the group visible then the stripetoken element then loads, and then it doesn’t matter if I make the group invisible again or not.
Now I see!
Thanks for the input.