Synthetic Industry

Troubleshooting guide · updated 2026-10-11

Expenses import as bills but the receipts are missing or on the wrong bill

Link expense, bill and receipt through one expense id, attach files after the bill exists within Xero's limits, and make a re-import safe, with draft-only creation.

Three things must stay linked

An imported expense involves an expense record, the bill created from it, and one or more receipt files. If the link between them is a filename, a row position or a date and amount, it will eventually break: two receipts with similar names, an expense reordered in a new export, or a corrected amount. The robust link is one expense identifier that never changes, carried from the export through to the bill and to each attached file.

How Xero attachments constrain the sequence

Xero documents attaching files to an invoice or bill once it exists, with up to 10 attachments of up to 25MB each. That fixes the order of work: create the bill first, then attach each receipt to the bill's identifier. It also means attachment failures are a distinct outcome from bill failures. A receipt that is too large, an eleventh file, or a network error should leave the bill in place and put the receipt on a failed list, not roll back the bill or silently skip the file. For bills, Xero treats the invoice number as a reference that is not unique, so it cannot by itself prevent a duplicate.

  • Record which expense ids have been imported, and which receipts were attached.
  • Expenses with no receipt should be flagged, not treated as errors.
  • Match receipts by expense id, never by position or filename alone.

Repeat imports and changed expenses

Without a record of imported ids, importing the same export again creates every bill twice. With one, a repeat creates nothing, and an expense whose amount or supplier changed since the first import is flagged for a person, because quietly editing a bill that someone has already coded or approved is a different decision from creating one.

Accounts, tax and approval stay with people

The category-to-account list and the tax type for each category come from your bookkeeper or accountant; the import follows them and holds any expense whose category has no row, as in the mapping-table guide. The import should create draft bills only. Approval, payment and any treatment of tax on an expense are person-controlled steps in Xero, outside software scope.

  • Do not let an import approve or pay anything.
  • A foreign-currency expense follows the same rate rules as a foreign-currency invoice.

What fits, what does not, and how it is accepted

The job "Import an expense export as draft Xero bills with the right account and receipt attached" is from £395, an untested published price confirmed after your enquiry, with payment after the agreed checks pass and you sign off. It is accepted when twelve invented expenses create twelve draft bills with the approved account and tax type, each receipt is attached to its own bill only, the expense without a receipt is flagged, and importing the same export again creates nothing.

It does not read receipt images, approve or pay bills, or advise what is a claimable expense. This guide is written from vendor documentation read on 11 October 2026. Send invented examples and counts first, never credentials, bank details, invoices or customer records; real records are handled only after written agreement through a secure handoff.

Sources and limits

  • Xero Accounting API: invoices Checked 2026-10-11.
    • For sales invoices (ACCREC) the InvoiceNumber is a unique code that Xero generates if omitted; for bills (ACCPAY) it is not unique and shows as the reference.
    • Up to 10 attachments of up to 25MB each can be added to an invoice or bill once it exists.
    • DRAFT is the default status when none is provided with the API call, and a draft can contain incomplete line items such as missing account codes.
  • Xero: account and payment mapping Checked 2026-10-11.
    • Xero says developers should not rely on the default chart of accounts because users often customise it or import different account codes, that users should choose accounts from drop-downs populated from their own chart of accounts rather than typing account codes, and that accounts with status ARCHIVED should be filtered out.
    • Users can change their chart of accounts after set-up, so Xero advises validating stored mappings, before each call for infrequent integrations, and sending the user back to fix a missing or archived account.
  • Xero: creating invoices best practice Checked 2026-10-11.
    • Xero's invoice guidance lists the validation error returned for an account code that is not valid or has been archived (for example "Account code '1234' is not valid, or has been archived").