I'm the programmer for a company that sells a web-based business software product, that lets the user run their business. Our system is also required to sync all financial information to our user's Desktop QuickBoooks. We use the QB Web Connector to do this.
When I send an invoice to QB that has already been paid in our system, first I send an InvoiceAddRq. I specify the exact AR account name in the ARAccountRef field.
When the InvoiceAddRs comes back, if the statusSeverity is INFO and the statusMessage is "Status OK", then I read the TxnID from the XML and store in in our database.
Then when the web connector sends the request for the next operation, I read the same TxnID from the database and send a ReceivePaymentAddRq, in which I use the exact same AR account name in the ARAccountRef, the exact same customer name in the CustomerRef, and in the AppliedToTxnAdd block of the ReceivePaymentAddRq, I use that same TxnID from the InvoiceAddRs for TxnID and the same invoice total for PaymentAmount that I sent in the InvoiceAddRq's InvoiceLineAdd's Amount field.
(Our InvoiceAddRq's always contain only one Invoice Line, with the grand total of the invoice in our system. We don't import our customers' individual items.)
Now -- Sometimes this works fine, but sometimes the ReceivePaymentAddRs contains the error "Object "..." specified in the request cannot be found" -- where the "..." is the TxnID I got from the initial InvoiceAddRs.
When this happens, the customer verifies to us that the respective invoice is indeed in their QB, but is not marked paid.
Also, to NOTE, our customers are NOT using multiple currencies, all currencies are in USD$, and the ReceivePaymentAddRq happens within a couple seconds after the InvoiceAddRq, which means that no QB user in the customer's company has time to modify the newly inserted invoice.
Why does this happen? Is it a QB bug?
EDIT:
2017-01-04 14:24:21
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="8.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<InvoiceAddRq>
<InvoiceAdd>
<CustomerRef>
<FullName>SILMAN DC</FullName>
</CustomerRef>
<ARAccountRef>
<FullName>Accounts Receivable:Accounts Receivable</FullName>
</ARAccountRef>
<TxnDate>2017-01-04</TxnDate>
<RefNumber>77671</RefNumber>
<BillAddress>
<Addr1>SILMAN DC</Addr1>
<Addr2>1053 31ST STREET NW</Addr2>
<Addr3/>
<Addr4/>
<City>WASHINGTON</City>
<State>DC</State>
<PostalCode>20007</PostalCode>
</BillAddress>
<ShipAddress>
<Addr1>1053 31ST STREET NW</Addr1>
<Addr2/>
<Addr3/>
<City>WASHINGTON</City>
<State>DC</State>
<PostalCode>20007</PostalCode>
</ShipAddress>
<PONumber/>
<TermsRef>
<FullName>Credit Card</FullName>
</TermsRef>
<InvoiceLineAdd>
<ItemRef>
<FullName>Invoice</FullName>
</ItemRef>
<Desc>Invoice</Desc>
<Quantity>1</Quantity>
<Amount>59.21</Amount>
</InvoiceLineAdd>
</InvoiceAdd>
</InvoiceAddRq>
</QBXMLMsgsRq>
</QBXML>
2017-01-04 14:24:21
<?xml version="1.0"?>
<QBXML>
<QBXMLMsgsRs>
<InvoiceAddRs statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<InvoiceRet>
<TxnID>A13F8-1483561159</TxnID>
<TimeCreated>2017-01-04T15:19:19-05:00</TimeCreated>
<TimeModified>2017-01-04T15:19:19-05:00</TimeModified>
<EditSequence>1483561159</EditSequence>
<TxnNumber>133184</TxnNumber>
<CustomerRef>
<ListID>800005FF-1478123373</ListID>
<FullName>SILMAN DC</FullName>
</CustomerRef>
<ARAccountRef>
<ListID>80000025-1423671174</ListID>
<FullName>Accounts Receivable:Accounts Receivable</FullName>
</ARAccountRef>
<TemplateRef>
<ListID>80000003-1423576739</ListID>
<FullName>Intuit Service Invoice</FullName>
</TemplateRef>
<TxnDate>2017-01-04</TxnDate>
<RefNumber>77671</RefNumber>
<BillAddress>
<Addr1>SILMAN DC</Addr1>
<Addr2>1053 31ST STREET NW</Addr2>
<City>WASHINGTON</City>
<State>DC</State>
<PostalCode>20007</PostalCode>
</BillAddress>
<BillAddressBlock>
<Addr1>SILMAN DC</Addr1>
<Addr2>1053 31ST STREET NW</Addr2>
<Addr3>WASHINGTON, DC 20007</Addr3>
</BillAddressBlock>
<ShipAddress>
<Addr1>1053 31ST STREET NW</Addr1>
<City>WASHINGTON</City>
<State>DC</State>
<PostalCode>20007</PostalCode>
</ShipAddress>
<ShipAddressBlock>
<Addr1>1053 31ST STREET NW</Addr1>
<Addr2>WASHINGTON, DC 20007</Addr2>
</ShipAddressBlock>
<IsPending>false</IsPending>
<IsFinanceCharge>false</IsFinanceCharge>
<TermsRef>
<ListID>80000009-1425488517</ListID>
<FullName>Credit Card</FullName>
</TermsRef>
<DueDate>2017-01-04</DueDate>
<ShipDate>2017-01-04</ShipDate>
<Subtotal>59.21</Subtotal>
<SalesTaxPercentage>0.00</SalesTaxPercentage>
<SalesTaxTotal>0.00</SalesTaxTotal>
<AppliedAmount>0.00</AppliedAmount>
<BalanceRemaining>59.21</BalanceRemaining>
<IsPaid>false</IsPaid>
<IsToBePrinted>true</IsToBePrinted>
<IsToBeEmailed>false</IsToBeEmailed>
<InvoiceLineRet>
<TxnLineID>A13FA-1483561159</TxnLineID>
<ItemRef>
<ListID>80000003-1423676477</ListID>
<FullName>Invoice</FullName>
</ItemRef>
<Desc>Invoice</Desc>
<Quantity>1</Quantity>
<Rate>59.21</Rate>
<Amount>59.21</Amount>
<SalesTaxCodeRef>
<ListID>80000002-1423576739</ListID>
<FullName>Non</FullName>
</SalesTaxCodeRef>
</InvoiceLineRet>
</InvoiceRet>
</InvoiceAddRs>
</QBXMLMsgsRs>
</QBXML>
2017-01-04 14:25:33
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="8.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<ReceivePaymentAddRq>
<ReceivePaymentAdd>
<CustomerRef>
<FullName>SILMAN DC</FullName>
</CustomerRef>
<TotalAmount>59.21</TotalAmount>
<PaymentMethodRef>
<FullName>Credit Card</FullName>
</PaymentMethodRef>
<DepositToAccountRef>
<FullName>Undeposited Funds</FullName>
</DepositToAccountRef>
<AppliedToTxnAdd>
<TxnID>A13F8-1483561159</TxnID>
<PaymentAmount>59.21</PaymentAmount>
</AppliedToTxnAdd>
</ReceivePaymentAdd>
</ReceivePaymentAddRq>
</QBXMLMsgsRq>
</QBXML>
2017-01-04 14:25:33
<?xml version="1.0"?>
<QBXML>
<QBXMLMsgsRs>
<ReceivePaymentAddRs statusCode="3120" statusSeverity="Error" statusMessage="Object "A13F8-1483561159" specified in the request cannot be found. "/>
</QBXMLMsgsRs>
</QBXML>
OK, one correction: It seems that I am NOT including an ARAccountRef aggregate in my ReceivePaymentAddRq. Probably because the IDN Unified OSR said it was optional. Is this the problem? Remember, it only happens once in a while...
**EDIT:
I added the ARAccountRef aggregate in my ReceivePaymentAddRq. Still getting the error.