Stop Stripe refreshing the page after charging the user

Hi, I have a 3-step check-in process controlled by custom state (each step has a group that shows/hide according to the CS “step”).
Stripe payment is my 1st step, after the charge, I want the Thing’s “payment collected?” to change from No to Yes, stay on the same page, and move forward to step 2.
However, Stripe refreshes the page after charging so the Thing cannot be changed and the workflow (step 1-2-3) gets interrupted.
Any idea how to avoid that?
Thanks.

*Screenshot here showing the 2 workflow steps that never get done because the page always get refreshed after charging the customer.

I am experiencing the same issue. I am interested to hear more from the community on how to solve this.

@arsedian.ivan @it15 What stripe plugin are you using?

Hey @boston85719 I am using the Bubble’s Stripe Plugin

Okay, in that case there likely is no way to change the behavior that is built into the plugin. If you were to be connecting to Stripe directly through API calls, then you’d have complete control over the way you integrate with Stripe, but using the plugin you are restricted in the things you can do.

It looks like you are trying to store some values on the database, based on whether or not somebody has paid. This is best done based on a webhook from Stripe. Webhooks have nothing to do with the plugin, but require you to set them up in your Bubble backend workflows and Stripe dashboard.

Then for the sense of changing steps for your flow, I would recommend not using custom states and instead use URL parameters (first test it out by putting a parameter into the URL before you run the action of charge current user - very simply just add into the URL of your browser the parameter and value, then refresh page, then press button to trigger charge)…if the URL parameter remains in the URL after the refresh the plugin forces, then the use of URL parameters for your steps is going to allow you to move the user onto the next step.

But, you can also test out whether or not there is any value in the URL after successful payment before the page is refreshed. Normally Stripe sends the user back to a URL specified after successful or cancelled payments and this info is in the URL, which can be used in conditional workflow actions to trigger actions, such as moving the user to the next step in the flow.

Ultimately, working with Bubble stripe plugin is a poor experience, because most people, just like I did, first start learning and implementing it, only to hit a brick wall in it’s usefulness for the app specific use cases, and then have to give up on the plugin and use an integration approach for integrating to stripe directly through API calls.

@boston85719
Thanks for the reply.
After trying different things, I agree it’s much more flexible to use the API connector instead of off the shelf Stripe plugin developed by Bubble.
However, it’s quite challenging for a non-technical person like me.
I will try to use the API connector.
Cheers.

There are some tutorials that help make it a little bit easier. I also have a course that makes it simple and is very comprehensive.