QuickBooks SDK HRESULT
0x80040400: QuickBooks found an error when parsing the provided XML text stream
Cause
The qbXML request is malformed or does not follow the schema: an unclosed tag, an unescaped &, a missing onError attribute, elements in the wrong order, or an element that does not exist in the qbXML version you declared.
Fix
- 1Validate the request as XML first: the free LedgerWire qbXML validator points at the line and column.
- 2Check element order against the schema: qbXML is order-sensitive (for example Name must come before CompanyName in CustomerAdd).
- 3Escape & < > in values (& < >).
- 4Make sure <?qbxml version="…"?> is not higher than the version QuickBooks supports (HostQuery tells you).
- 5With LedgerWire REST calls, the element order is handled for you.
How LedgerWire handles it
LedgerWire returns this code in the error’s qbStatusCode with a plain-language fix, re-queues requests a broken Web Connector session dropped, and alerts you when a connection stops checking in. The hosted sandbox reproduces 3100, 3120, 3140, 3200, 3070 and 0x80040400 so you can test your error handling without Windows.
Related errors
Tired of debugging the Web Connector by hand?
Try the hosted sandbox