How do I resolve the export error as follows, "The TaxType code XXX cannot be used with account code XXX"?

The error "The TaxType code XXX cannot be used with account code XXX" is returned by Xero and shows if you select an incorrect tax rate for the transaction you’re trying to publish. For instance, if you used income code instead of expenses code on VAT or when you try to match EXPENSE account against REVENUE tax type.

To resolve, change the ledger account in your export rule. If this doesn't help, you should check your Chart of Accounts in Xero and change the definition of the account in Xero. The nature of the ledger account and tax rate must match. 

If you’re publishing a document as a:

  • Purchase, spend money or A/P credit note – select an expenses tax rate

  • Invoice (A/R) or A/R credit note – select an income tax rate

For example, with the following Account Code: 310 - Cost of Goods Sold, the Tax Rate should not be "Standard-Rated Supplies - 8%" which is a Sales tax rate. It should be instead along the lines of "Standard-Rated Purchases - 8%"

Export Rule with wrong Tax Rate