Common Integration Errors: Xero

Some of the common errors with integrating to Xero and what to do.


Table of Errors and Actions


Some of the common errors that may occur with integration to Xero. 

More details are found here Identifying Xero Integration Errors.

If the error you are experiencing is not listed, please contact us at support@lentune.com.

Return to Top of Page

Table of Errors and Actions

Invoices staying in the process screen without an X or a tick.

If the invoice already exists in Xero, you won't get a tick or a cross. If you do a search of invoices in Xero (including deleted and voided) you should find it.

”Title”.”An error occurred”
”Detail”.”An error occurred in Xero. Check the API Status page http://status.developer.xero.com for current service status…”

The invoice number exceeds 50 characters so needs to be shortened.

Refer to this note on how to do this.

"Incorrect inventory asset account specified", your line's GL Code may not match the item's tracking account in Xero"
"Message": "Account code 'XXX' is not a valid code for this document."
The GL code is incorrect or doesn't exist in Xero.

It could also mean that the code exists but the tax settings in Xero are incorrect.
"Message": "Account code 'XXX' has been archived, or has been deleted. Each line item must reference a valid account." GL code is not active, likely archived or missing from chart of accounts in Xero.
Invoice [xxxx]'s payable account is not in Xero supplier contact List.

The Lentune Payable account listed against the invoice does not have a link to the equivalent in Xero, or the Xero record is a Contact, not a Supplier.

Please refer to Invoice Batch to Xero can't find a Supplier to read how to correct this.

A Contact must be specified for this type of transaction.

This means the supplier in Xero can't be found. If you're using V8 Lentune and not on V9 yet,  in Xero you can look up the supplier, edit it and add the payable’s name in the ‘add account number’ field to correct this.

The status ARCHIVED is not valid for contacts.

You may see a long error message with this or similar text included:

The contact with the specified contact details has been archived. The contact must be un-archived before creating new invoices or credit notes.\"\n },\n {\n \"Message\": \"The status 'ARCHIVED' is not valid for contacts. .

  1. Search for the payable/contact in Xero. It will be in the archived section. Click into it and there is a Restore button.
  2. Alternatively, if you have selected the wrong payable you can update it in Lentune by going to the invoice and selecting the orange Update processed invoice button on the Actions tab.
{"Title":"An error occurred","Detail":"An error occurred in Xero. Check the API Status page http://status.developer.xero.com for current service status.","Status":500,"Instance":"baca28b8-dbe5-4990-8654-4706c806683d"} There could be multiple reasons for this but the most common is that an invoice number is too long. Xero has a character limit. If the batch has an invoice in it with a particularly long number, trying making it shorter then export it again.
You can also click through to the http://status.developer.xero.com/ link. They may be having an outage at their end. It will be listed like this:

"There is no Xero organisation with this Xero Network Key. Please contact ***X Customer*** to make sure you're using the correct key"

A network key is stored against the contact in Xero which is causing it to fail validation. Log in to Xero and take the following steps;

  1. In the Contacts menu, select All contacts.
  2. Open the contact mentioned in the error message, then click Edit.
  3. Select the Sales defaults section.
  4. In the Xero network key field, remove any data.
  5. Click Save & close.

  Return to Top of Page

Was this helpful? If you require further assistance or would like to contact us about this article, please email us at support@lentune.com.

Thank you. Your feedback is appreciated. 

Last updated: 1 June 2023