I use the xero api to create invoices. They are created as approved and are immediately emailed to the client using Xero's email endpoint. The invoices can also be created with a discount which works fine until we come to voiding that invoice. The discount amount which Xero uses will always be £0.01 off the actual discount amount. This isn't an issue when viewing the invoice, but I can see that the amount is off in the request history in the Xero developer platform. If the discount I pass through is £30.00, then the TotalDiscount
which shows in the response is £29.99.
I get the error message:
"ValidationErrors": [
{
"Message": "The line total 269.00 does not match the expected line total 269.01"
}
]
I have checked that we are sending the correct amount and there is no reason that I can see for it to consistently be just off the correct amount. I feel like it must be Xero's end