ANS-1939 · WEB SERVICES & INTEGRATIONS
How to Fix ‘Transaction Not In Balance’ Error in NetSuite Web Services
A 'Transaction not in balance' error in NetSuite Web Services often indicates that an amount value exceeds the supported decimal precision.
Short answer
The 'Transaction not in balance' error in NetSuite Web Services is caused by amount values with excessive decimal places. NetSuite supports a limited number of decimals, often two. To resolve, truncate or round amount values in Web Services requests to the appropriate precision, such as sending 3.59 instead of 3.5949999999999998.
Scenario
When attempting to create or update transactions in NetSuite via Web Services, users may encounter the error message 'Transaction was not in balance (Foreign currency). Total = 0.01 '. This issue typically arises when the Web Services request includes an amount value with a high degree of decimal precision, such as 3.5949999999999998.
Solution
NetSuite's Web Services have a limitation regarding the number of decimal places supported for amount values in requests. While a request might send a highly precise value like 3.5949999999999998, NetSuite typically suggests limiting amounts to two decimal places. To resolve the 'Transaction not in balance' error, ensure that all amount values transmitted through Web Services are truncated or rounded to the supported decimal precision. For instance, instead of sending 3.5949999999999998, the amount should be adjusted to 3.59.
Expert NetSuite Support
Need help with this NetSuite issue?
Web Services & Integrations consulting and configuration support
