On calling to add a bank_transaction_explanation I am getting a 422 with the message
Exception: Request failed for https://api.freeagent.com returned code 422. Truncated server response: {"errors":[{"message":"sales_tax_rate must be the AUTO rate or a rate less than 0"}]}
The VAT settings in Freeagent haven’t changed - still VAT registered, and the request is generated from a script which is run at the end of each vat quarter and has not changed.
{"bank_transaction_explanation":{"bank_transaction":"https://api.freeagent.com/v2/bank_transactions/634388057","dated_on":"2025-05-30","gross_value":29.9,"paid_invoice":"https://api.freeagent.com/v2/invoices/79584954","sales_tax_status":"TAXABLE","sales_tax_rate":20}}
The API specification has this as decimal.
Any ideas where the issue might be?
Phil
I ran into that same error recently. In my case the user’s VAT registration had changed from not registered to registered, but it sounds like that doesn’t apply to you.
Yes, I saw your thread and checked mine out. It’s my account and unless something awry is kicking off, the VAT registration status has not changed. Hoping there’s an explanation,
Hello Phil,
I am one of the engineers on FreeAgent and I have looked into your query. We recently added some extra validation for the sales_tax_rate
attribute. If the submitted explanation is not relevant for sales tax we will reject the request with the sales_tax_rate must be the AUTO rate or a rate less than or equal to 0
message. In your example the explanation submitted was for an invoice payment so now we expect it to have 0
or AUTO
sales tax rate (I realise the message you were getting only said less than 0
, which was an error on our end, it is now updated to say less than or equal to 0
).
As to why we have made this change - we want to avoid having inconsistent data in our database where explanations have incorrect sales tax rate. While explanations that are not relevant for sales tax having non-zero rate doesn’t lead to any bad/unexpected accounting effects it does cause some UI bugs, which should now be fixed going forward.
Hope this helps.
Bogdan
Thank you for the response.
I had changed to AUTO and completed what I needed to do so confirm that AUTO works in my case. Understand the reasons for the update, maybe it was in a release note / list of fixes applied as it caught me by surprise that this change had broken my implementation?
It was the “less than zero” that threw me too as we do have invoices to supply outside of the UK which would be 0 - but not negative 
Regards,
Phil