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.