qbXML status code 3040
ErrorQuickBooks 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.
What QuickBooks says
There was an error when converting the amount "%1" in the field "%2". %4
QuickBooks fills in the marked parts when it answers: usually the value, the field, the kind of record and a longer explanation of its own.
It arrives on the response element as statusCode="3040" statusSeverity="Error", with this text in statusMessage.
What to do
Write every amount with two decimals: 40.00, not 40.
Seen from a real company file
-
Answering ReceivePaymentAdd:
There was an error when converting the amount "0" in the field "TotalAmount".
Things to know
- 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
With QuBe Sync's API
QuBe Sync reads QuickBooks' response for you. When ReceivePaymentAdd gets this code, your webhook receives this JSON:
{
"error": {
"debug_message": null,
"error_code": 3040,
"error_type": "quickbooks_business_error",
"hresult": null,
"message": "There was an error when converting the amount \"0\" in the field \"TotalAmount\". ",
"user_message": "QuickBooks couldn't read one of the amounts in this request. QuickBooks said: There was an error when converting the amount \"0\" in the field \"TotalAmount\". "
},
"state": "error"
}
Wording read from QuickBooks Enterprise Solutions 24.0 (R21_80).