Forum Academy Marketplace Showcase Pricing Features

Deleting an order if Stripe payment unsuccessful

When a user buys something through my app, it creates an order. Creating the order occurs on the workflow before the payment is taken (I have to use the value of the order to know how much to charge the user) so if that payment doesn’t go through, I want to delete the order that was created. To do this I’m using a “Delete a Thing” action on the workflow but…

…I’m not sure what option to specify when the Payment fails in the “Only when” list. I’ve tried Only when the Charge ID is blank but this did nothing. I was assuming the charge ID would only be assigned when payment was successful. Can anyone advise?

How are you using Stripe? Do you have API setup, Bubble plugin or another plugin from a 3rd party developer?

Just the Bubble plugin.

Okay, the charge id is not populated only if the charge is paid, as a charge is created in order to attempt a charge, so I don’t believe going off the charge id as empty is the right approach.

I see ‘Captured’ which to me would imply the charge was captured as in the payment was made…you may try that.

I personally am not very familiar with the Bubble Stripe plugin as I gave up on it a few years ago.

If there is information in the URL when a payment is made or not, which when working with the API there is, usually in the form of a path item of ‘success’ or ‘cancel’, which when I set up things with the Stripe API is what I go off of for simplicity, then I use a webhook to confirm.

Thank you. This is interesting. I’ve been trying to accomplish this for nearly a week now and wasn’t aware that the Stripe PlugIn was only one way of interacting with Stripe. I’ve had real trouble comprehending other responses about this that talk about “the URL” etc because I didn’t know what it was.
I’ll have a stab at the Capture option although I think I tried that earlier and didn’t succeed earlier. But I appreciate your help as you’ve clarified several things for me.
All the best

1 Like