(1) Purchase #1 for $25 successful --> reduce remaining limit from $10000 to $9975.
(2) Purchase #2 for $10000 rejected and refund pending --> DO NOT reduce limit since you know the purchase didn't go through.
(3) Purchase #3 for $9975 within limit --> allow purchase, reduce limit to exactly $0.
Instead, at step 2, the software seems to handle the purchase by unconditionally taking $10000 off the limit at purchase time and putting $10000 back later when the refund is processed. (And consequently, at step 3, it failed the purchase.)
There isn't an obvious reason to do it this way, so it's surprising. It seems like if you can reduce the limit, you can check if you've exceeded it and just fail the purchase and never modify the limit (at purchase or refund time).