I found the solution. in case someone has the same problem in future and comes accross my initial post here’s the fix that I found:
This applies to a single charge, meaning that someone pays for something on your web app like food or buying clothes, etc. (not subscriptions).
When I charged a user for x$, I was saving the amount in my database.
1- charge current user x$/
2- Save in database result of step 1’s amount
For some reason, when a user is charged using the Stripe plugin built by Bubble, Bubble saved the amount as x00. example: charge user 5$, bubble will save 500 in the databse.
Now, when I was trying to refund the amount in the database, I was trying to refund 500$. Since Stripe sees the charge as 5$ with the charge ID, it wasn’t going through.
To fix this, when you save the amount in the database, save it as:
Result of step 1 (or wtv step number)'s amount/100.
Now Stripe will be able to refund the amount that was charged.
This is because of how Stripe handles number values associated with prices. In Stripe it is all done as in cents, so $5 USD is 500 cents. They also handle dates differently. Stripe uses the number of seconds since Epoch time while Bubble uses milliseconds…makes it necessary to have conversions for these when wanting to display the proper values in your Bubble app, as well as creating the filtering and pagination features to display list of things from Stripe.
Be sure to checkout the Stripe Integration Course when you are ready to integrate Stripe payments to start monetizing your application via product sales or subscriptions.