My UK-based application needs to create invoices using Xero's API. Some customers are in other EU countries, so I have to use a different VAT rate for them.
I've added a new Tax Rate called 'MOSS Spain 21%', with the Tax Type as 'MOSS Sales'.
When creating an invoice via the API using this tax rate I get the following validation exception:
The TaxType code MOSS Spain 21% does not exist or cannot be used for this type of transaction.
The TaxType code 'MOSS Spain 21%' cannot be used with account code '200'.
200 is the sales account, so should be fine. I can manually create an invoice in the Xero UI. It's just the API call that fails. Other invoices with the normal OUTPUT2 tax rate work.
I'm using the .NET Xero API: https://github.com/XeroAPI/Xero-Net