An amount written without its decimals, such as <TotalAmount>40</TotalAmount>, is refused with 3040 though the XSD allows it; quantities and rates are taken as integers
Observed 2026-10-09 on QuickBooks Enterprise Solutions 24.0 (US), reporting qbXML 17.0.
QuickBooks refuses an amount written without its decimals, such as <TotalAmount>40</TotalAmount> or <TotalAmount>0</TotalAmount>, with status 3040, though the XSD's AMTTYPE pattern makes the decimal part optional. The same amount written as 40.00 or 0.00 is read. QuickBooks reads amounts before it looks up references, so the 3040 comes first.
This ReceivePaymentAdd carried <TotalAmount>0</TotalAmount> and answered:
<ReceivePaymentAddRs statusCode="3040" statusSeverity="Error" statusMessage="There was an error when converting the amount "0" in the field "TotalAmount". " />
The same request with <TotalAmount>0.00</TotalAmount> answered status 0. Four requests sent together, differing only in TotalAmount and each naming a customer ListID that does not exist, answered:
0: 3040, "There was an error when converting the amount "0" in the field "TotalAmount". "40: 3040, "There was an error when converting the amount "40" in the field "TotalAmount". "0.00: 3120, the customer could not be found40.00: 3120, the same
The message ends with a space. Quantities and rates are not held to this: a Quantity written as an integer was taken, and a Rate written as an integer got past the amount check to a reference error.
What to do
Write every AMTTYPE value with exactly two decimals, 40.00 and 0.00 included, even where the XSD would accept it without them. If your application builds qbXML from numbers, format amounts as fixed two-decimal text rather than letting an integer go out as written.
Not observed
- Amount fields other than
TotalAmountonReceivePaymentAdd, and amounts in a query's filter. - Whether the amount is read before a missing required element (3150) or a stale
EditSequence(3200). - An amount with one decimal, such as
40.5, which the XSD refuses.
Error codes on this page
- 3040 QuickBooks couldn't read an amount: it was written without its two decimals, such as 40 for 40.00, which the qbXML schema allows and QuickBooks doesn't. The message names the value and the field.
- 3120 The request named a record by its ListID or TxnID, and the company file has no such record.
- 3150 QuickBooks requires an element the request left out; the message names it.
- 3200 The EditSequence sent is not the record's current one: the record changed in QuickBooks after you read it.
QuBe Sync is a JSON API for QuickBooks Desktop that is built on what these findings show.