#davidsacks-interac
1 messages · Page 1 of 1 (latest)
Hello! Give me a minute to look into this
What value are you passing in for amount?
One second, I was not paying attention to that, but that now makes me wonder 🙂
Okay - we just tried a different one with a different amount and it worked - I see where you are going with this. The amount triggered a certain error. Thanks.
Is there somewhere those amounts are documented for testing?
Yeah we need better error messaging here (and I'll make sure to flag to the terminal team) - I'm guessing you were passing in a non-integer amount?
Yup, that would do it - any integer amount that is below the original charge amount should work
For context, you can also see that we only accept a positive integer for amount when you create a refund through the API (https://stripe.com/docs/api/refunds/create#create_refund-amount)
The amount was always an integer and positive and less than the original amount. I'm guessing like in other test scenarios, the amount can can trigger certain errors. We'll watch for that.
Are you saying that you have seen this error with positive integer amounts as well?
Yes
The amount on the one that gave us the error was 419
I miss-led you above and said we passed a non-integer amount, it was an integer amount.
So I see the logs for the failed refund on my end for charge ch_3JXaClIWUp0iWB8W04qTqfY5, and I see that the amount passed in was 419.00000000000006 and not 419.
Ahh - thank you so much. That is it. We multiplied the amount by 100, but stupid JS math got us and was not exact. We'll fix that.
awesome! glad we could clear that up!
Yes, thank you.
I was getting worried for a minute that there was a larger issue