If I have a $6.00 purchase and the tax rate is 9.75%, then the calculated taxes is 0.585. In my app, I would round that up to 0.59; however, when I integrate to Square, it looks like Square is calculating the taxes at 0.58, so I’m getting a payment amount doesn’t match order amount error. Does Square always round down taxes if it’s at a half?
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Step 5: Take a Credit Card Payment
Step 3: Take a Cash Payment
Payment APIs
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
Square uses a method called Bankers’ Rounding, also known as Rounding Half to Even. Under this method, half-values round to the closest even integer. This means that if the tax calculation results in a half-value, it will round down if the preceding number is even and round up if it’s odd. So in your case, since 0.585 is a half-value and the preceding number (5) is odd, it will round down to 0.58. This is why you’re seeing a discrepancy between your app’s calculation and Square’s calculation.
This answer was reviewed by @Bryan-Square.