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:

qbXML
<ReceivePaymentAddRs statusCode="3040" statusSeverity="Error" statusMessage="There was an error when converting the amount &quot;0&quot; in the field &quot;TotalAmount&quot;. " />

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 found
  • 40.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 TotalAmount on ReceivePaymentAdd, 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

QuBe Sync is a JSON API for QuickBooks Desktop that is built on what these findings show.