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 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>
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)