Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

The TaxType code 'OUTPUT2' cannot be used with account code '300'.

Started by Vikas Khairnar -   in API Endpoints

Hi,
Hi,
I am getting this type of error while processing supplier invoices

The TaxType code 'OUTPUT2' cannot be used with account code '300'.

I am executing API Invoices with following xml

<Invoices>^M
<Invoice>^M
<Type>ACCPAY</Type>^M
<Contact>^M
<ContactID>0ed1f683-a2c4-4fe3-950d-c13bb47f1536</ContactID>^M
</Contact>^M
<Date>2013-05-06</Date>^M
<DueDate>2013-06-05</DueDate>^M
<Status>AUTHORISED</Status>^M
<LineAmountTypes>Exclusive</LineAmountTypes>^M
<LineItems>^M
<LineItem>^M
<Description>missing invoice damon</Description>^M
<Quantity>1</Quantity>^M
<UnitAmount>30.41</UnitAmount>^M
<TaxAmount>6.082</TaxAmount>^M
<TaxType>OUTPUT2</TaxType>^M
<AccountCode>300</AccountCode>^M
</LineItem>^M
</LineItems>^M
</Invoice>^M
</Invoices>
Hi Vikas,

The error and your XML input shows that you are using an EXPENSE account code against a REVENUE tax type. The account type and tax type must match. Please refer to : http://developer.xero.com/documentation/api/accounts/ for more info on account types and tax types.
 

Samitha N (Xero Staff)