4

I'm working in QBXML and trying to apply a payment to specific invoice in a ReceivePaymentAddRq. I'm getting the, apparently quite common, "Object TxnID specified in the request cannot be found". Most other forums threads on this topic are resolved once the ARAccountRef field is added to the request, that didn't seem to make a difference for me.

I've queried the invoice for TxnID 68B4-1290718970 and verified the following:

  • My request's ARAccountRef ListID matches what is in the QueryRet
  • My request's CustomerRef ListID matches what is in the QueryRet

My XML request is below. What am I missing?

Thanks

<QBXML>
    <QBXMLMsgsRq onError = "continueOnError">
    <ReceivePaymentAddRq requestID = "0">
        <ReceivePaymentAdd>
            <CustomerRef>
                <ListID>80000111-1286514304</ListID>
            </CustomerRef>
            <ARAccountRef>
                <ListID>80000091-1273734429</ListID>
            </ARAccountRef>
            <TxnDate>2010-11-10</TxnDate>
            <RefNumber>2999      </RefNumber>
            <TotalAmount>15.95</TotalAmount>
            <PaymentMethodRef>
                <ListID>80000002-1273560098</ListID>
            </PaymentMethodRef>
            <Memo>_32T0DE94J</Memo>
            <DepositToAccountRef>
                <ListID>80000090-1273734138</ListID>
            </DepositToAccountRef>
            <AppliedToTxnAdd>
                <TxnID>68B4-1290718970</TxnID>
                <PaymentAmount>15.95</PaymentAmount>
            </AppliedToTxnAdd>
        </ReceivePaymentAdd>
    </ReceivePaymentAddRq>
    </QBXMLMsgsRq>
</QBXML>
Jonathan
  • 3,464
  • 9
  • 46
  • 54

1 Answers1

4

For anyone else's reference, the question was already answered over here:

Updated answer now that Intuit have taken down their own forums:

There are a couple of common reasons for the error you're seeing:

  • The object you're referring to (68B4-1290718970) might not exist. Are you 100% positive this transaction exists?

  • The object you're referring to might not be something you can apply a payment to. You apply payments to Invoices. Is the object you're referring to an invoice?

  • The object you're referring to might not have the same currency that the payment has. Are you using multi-currency with QuickBooks, and do the currencies match?

  • The object you're referring to may not have a matching A/R account with the payment. This is especially common if you have multiple A/R accounts in QuickBooks, and you're not explicitly specifying which A/R account to use when creating the invoice or payment. Do the A/R accounts for the invoice and the payment match?

  • The object that you're referring to might not have an open balance (e.g. it might already be paid). Does the object that you're referring to have a balance of at least 15.95? (the amount you tried to apply)

Keith Palmer Jr.
  • 27,666
  • 16
  • 68
  • 105
  • Great info. My issue was #4, not specifying the AR account explicitly. – Dan Smith Mar 15 '16 at 22:59
  • In my case, a bug in the code was trying to link a credit to an invoice under the wrong company name. What I'm taking from this (based on what's written above) is that QuickBooks performs a WHERE-like query internally with the transaction ID as one of the conditions. Something like: WHERE txnID = ? AND company = ? AND account = ? … — if any of these conditions fails, QuickBooks blames it on the object not existing at all, whereas it may well exist but another query condition fails. This is why InvoiceQuery demonstrates that the object exists while ReceivePaymentAdd is adamant that it does not. – Daniel Beardsmore Nov 22 '16 at 11:49