Xero: "Account code '820' is not a valid code for this document"
Updated
Your sync or import to Xero fails with Account code 'NNN' is not a valid code for this document, even though the account exists in your chart of accounts.
Your sync or import to Xero fails with Account code 'NNN' is not a valid code for this document, even though the account exists in your chart of accounts.
| What we checked | Where |
|---|---|
| Xero Accounting API response codes | developer.xero.com |
| Real report: Account code '820' not valid via API | stackoverflow.com |
Check it yourself
- Look up the code in Accounting, then Chart of accounts. If it is a system account (for example Realised Currency Gains, GST/VAT, Retained Earnings, Accounts Receivable), Xero allows it only for its own automatic entries. Connectors can't post to it, even where the Xero screens allow a manual entry.
- If it is a bank account, invoices and bills can't use it as a line account either.
- If the account is archived, or the code was renumbered, the connector is still sending the old one.
- Map that line to an ordinary revenue, expense or clearing account in the connector, replay one record, then the rest.
Still failing?
Email the full error text and one record reference to money@iftodo.ai for a free first look. Remove customer names, amounts and credentials, and never send your accounting password. We'll tell you what the error points to and whether we can help.
Weekly sync checks for €29 a month
For one Shopify or Square to QuickBooks workflow, we check weekly exports for missing or duplicate records and email you when we find a mismatch. We run a sample first to see whether the two exports have matching references.
Ask for a sample check. We agree how to share exports before starting billing. Cancel by email before your next renewal.