"Stripe error: No such charge" with refund worflow

Hello,

I’m creating a bike rental app using the Stripe plugin. The purchase process runs smoothly, but I still get an error message when canceling or refusing the rental on the refund workflow. That’s all that’s left to finalize.

After the “Charge the current user” workflow, I save the payment ID in the reservations data type (I’ve tried Charge ID or Payment intent ID and the result is the same). When refunding, I use the “Create a refund” workflow with the saved Charge ID and here’s the error I get every time with the saved number:

I’ve checked the Privacy rules and the ID is visible.

Has anyone had this problem before?

could be that the charge was from a test data and you are running in live the refund or vice versa.

But easiest way to verify if the charge exists, is to check in Stripe dashboard by searching via the charge ID.

Also, it looks like you are attempting to use the Payment Intent ID rather than the Charge ID, as Payment Intent IDs start with pi_ as in the error popup, while charge starts with ch_ I believe.

Thanks for your feedback.
My customer only tested in Live so ad creation, payment and refund attempt were done on Live.
I also tried with the Charge ID, the message is the same with a number actually starting with ch.

Perform a new small test transaction ($1) in the Live environment and attempt a refund. Make sure that you can access both live Stripe dashboards to review the info on them that Stripe provides. Review you Bubble logs. For this test transaction remove privacy rules or alternatively consoleLog the data you are sending to make sure that it is being passed.

Hi,

Sorry for the late reply, but I had already checked everything, I even contacted Stripe and Bubble.io and nobody found the solution to the problem.

So I turned to Stripe API calls. It wasn’t easy, as I didn’t know anything about it, but I managed to make the payment intention, the session checkout and the complete or partial capture of the payment (whether or not the franchise should be debited) :slight_smile:

Thank you.