QBXML Receive payment applied to multiple Invoices - qbxml

I'm trying to apply 1 payment to multiple invoices with QBXML and I'm getting the following error
QuickBooks found an error when parsing the provided XML text stream
My XML:
<?xml version="1.0" encoding="utf-8"?><?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="continueOnError">
<ReceivePaymentAddRq>
<ReceivePaymentAdd>
<CustomerRef>
<ListID>8000254C-1444676392</ListID>
</CustomerRef>
<TxnDate>2018-12-13</TxnDate>
<RefNumber>457</RefNumber>
<TotalAmount>863.10</TotalAmount>
<Memo></Memo>
<PaymentMethodRef><FullName/></PaymentMethodRef>
<AppliedToTxnAdd>
<TxnID>11B0C6-1544760951</TxnID>
<PaymentAmount>179.00</PaymentAmount>
</AppliedToTxnAdd>
<AppliedToTxnAdd>
<TxnID>11B0CA-1544761043</TxnID>
<PaymentAmount>684.10</PaymentAmount>
</AppliedToTxnAdd>
</ReceivePaymentAdd><IncludeRetElement>TxnID</IncludeRetElement><IncludeRetElement>RefNumber</IncludeRetElement></ReceivePaymentAddRq></QBXMLMsgsRq></QBXML>
Notice I have 2 AppliedToTxnAdd elements.
However if I only apply 1 AppliedToTxnAdd, it works!

The issue was the order of the xml elements. QB cares about that.

Related

Create Order status code 400 - Server Error

I'm trying to build a simple payment flow using Bluesnap. Currently I've been able to capture the users billing information using Hosted Fields, and then saved it to a "Shopper" in bluesnap. Now I'm trying to use the same Shopper to create an order (https://developers.bluesnap.com/v8976-Extended/docs/create-order), but I can't get it to work.
I'm sending this:
<order>
<ordering-shopper>
<shopper-id>
--Shopper ID--
</shopper-id>
<web-info>
<ip>127.0.0.1:61106</ip>
<remote-host>www.merchant.com</remote-host>
<user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
</web-info>
<fraud-info>
<fraud-session-id>1234567890</fraud-session-id>
</fraud-info>
<authorized-by-shopper>true</authorized-by-shopper>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2425735</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>15.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
Using a POST-request to BLUESNAPDOMAINPATH/services/2/orders
The only response I get is a status code 400 with the body containing "Server Error"
Does anyone know how to solve this issue?
Your root xml element is missing the namespace:
<order>
Should be:
<order xmlns="http://ws.plimus.com">

Quickbooks Desktop BillPaymentCheckAdd error object not found

I am trying to add a $20 payment to a bill. This is from the sample Quickbooks file. However i am getting the error Object \"3E42-1071498278\" specified in the request cannot be found. " Any ideas. I have tried multiple things. I have indeed checked that the bill exists. I have included below the generated qbxml from the sdk. I am using version 13 of the sdk and QB version 14. Changing the date has no bearing on the error response
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError = "continueOnError">
<BillPaymentCheckAddRq requestID = "0">
<BillPaymentCheckAdd>
<PayeeEntityRef>
<FullName>Sergeant Insurance</FullName>
</PayeeEntityRef>
<APAccountRef>
<FullName>Accounts Payable</FullName>
</APAccountRef>
<TxnDate>2017-01-21</TxnDate>
<BankAccountRef>
<ListID>20000-933270541</ListID>
<FullName>Checking</FullName>
</BankAccountRef>
<RefNumber>11000</RefNumber>
<Memo>786-35 Sample</Memo>
<ExchangeRate>1.000000</ExchangeRate>
<AppliedToTxnAdd>
<TxnID>3E42-1071498278</TxnID>
<PaymentAmount>20.00</PaymentAmount>
</AppliedToTxnAdd>
</BillPaymentCheckAdd>
</BillPaymentCheckAddRq>
</QBXMLMsgsRq>
</QBXML>
The error says the transaction with that ID cannot be found. You may see the transaction in QB, but how do you know that the transaction you are looking at in QB has that ID? QB does not think it does.
I would expect to see a BillToPayQueryRq and pulling the transactionID out of the BillToPayQueryRs.
Make sure the payeeEntityRef matches the Bill Txn. You can provide a valid TxnID but if it is not tied to the proper Payee QB will give a TXNID not found error.

What are the MatchNumericCriterion in QBPOSSDK Query Request

I am attempting to query open purchase orders. My first attempt was to use the PurchaseOrderStatusDesc="Open" however the return was Unsupported filter (PurchaseOrderStatusDesc). I would then like to try UnfilledPercentageFilter however here is no documentation regarding this filter and particular the enums for MatchNumericCriterion.
Request should look something like this:
<?xml version="1.0" ?>
<?qbposxml version="1.0"?>
<QBPOSXML>
<QBPOSXMLMsgsRq onError="stopOnError">
<PurchaseOrderQueryRq requestID = "21">
<PurchaseOrderStatusDesc >Open</PurchaseOrderStatusDesc>
</PurchaseOrderQueryRq>
</QBPOSXMLMsgsRq>
</QBPOSXML>

What is an InstallationID in Quickbooks QBMSXML

I have a qbmsxml that I'm sending that continues to get a response error 2000.
<qbmsxml>
<signonmsgsrq>
<signondesktoprq>
<clientdatetime>2014-04-03T09:37:23</clientdatetime>
<applicationlogin>my.application.login.id</applicationlogin>
<connectionticket>SDK-MY-Connection-Ticket</connectionticket>
<language>English</language>
<appid>9999999999</appid>
<appver>1.0</appver>
</signondesktoprq>
</signonmsgsrq>
<qbmsxmlmsgsrq>
<customercreditcardauthrq>
<transrequestid>140403937231</transrequestid>
<creditcardnumber>4111111111111111</creditcardnumber>
<expirationmonth>12</expirationmonth>
<expirationyear>2017</expirationyear>
<isecommerce>true</isecommerce>
<amount>0.01</amount>
<nameoncard>John Doe</nameoncard>
<creditcardaddress>1234 Main Street</creditcardaddress>
<creditcardpostalcode>12345</creditcardpostalcode>
</customercreditcardauthrq>
</qbmsxmlmsgsrq>
</qbmsxml>
As I've been reviewing the information on creating a request, I found an 'InstallationID' tag referenced. It goes in the element like so:
<signonmsgsrq>
<signondesktoprq>
<clientdatetime>2014-04-03T09:37:23</clientdatetime>
<applicationlogin>my.application.login.id</applicationlogin>
<connectionticket>SDK-MY-Connection-Ticket</connectionticket>
<installationid>IDTYPE</installationid>
<language>English</language>
<appid>9999999999</appid>
<appver>1.0</appver>
</signondesktoprq>
</signonmsgsrq>
My question is: What is the IDTYPE for InstallationID? Where can I get it? What options can I set it to?
I think the problem is not related to your InstallationID field at all. I think the problem is that your XML isn't conforming to what Intuit expects.
Specifically, everything in your XML request is lowercase, when Intuit expects it to be camel case. You're also missing a qbmsxml version header, and a xml version header.
Here's an example of a correctly formed request:
<?xml version="1.0" encoding="utf-8"?>
<?qbmsxml version="3.0"?>
<QBMSXML>
<SignonMsgsRq>
<SignonTicketRq>
<ClientDateTime>2009-10-09T13:14:16</ClientDateTime>
<SessionTicket>xxxxxxxxxxxxky4yL6eBtCULX1zgQ:106892184</SessionTicket>
</SignonTicketRq>
</SignonMsgsRq>
<QBMSXMLMsgsRq>
<CustomerCreditCardChargeRq>
<TransRequestID>35f9cf7cb20994e8a32e6b3e91e8e602</TransRequestID>
<CreditCardNumber>xxxxxxxxxxxx5100</CreditCardNumber>
<ExpirationMonth>10</ExpirationMonth>
<ExpirationYear>2009</ExpirationYear>
<Amount>295.00</Amount>
<NameOnCard>Keith Palmer</NameOnCard>
<CreditCardAddress>56 Cowles Road</CreditCardAddress>
<CreditCardPostalCode>06279</CreditCardPostalCode>
</CustomerCreditCardChargeRq>
</QBMSXMLMsgsRq>
</QBMSXML>
Where are you getting your syntax from? It seems very wrong... here are some good examples:
http://wiki.consolibyte.com/wiki/doku.php/quickbooks_qbms_integration

Retrieve a List of All Checks for an Account using qbXML

I'm working on a website for a client that integrates into QuickBook desktop. I need to get a listing of all the checks for a specific account (ideally I would like all transactions for that account [regardless of their type] but if I have to get them one at a time that's fine). When I send the following XML:
<ns1:sendRequestXMLResponse>
<ns1:sendRequestXMLResult>
<xml version="1.0" encoding="utf-8" ?>
<qbxml version="12.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<CheckQueryRq>
<AccountFilter>
<ListID>800000F1-1362066981</ListID>
</AccountFilter>
<IncludeLineItems>true</IncludeLineItems>
</CheckQueryRq>
</QBXMLMsgsRq>
</QBXML>
</ns1:sendRequestXMLResult>
</ns1:sendRequestXMLResponse>
I receive the following error:
<CheckQueryRs statusCode="1" statusSeverity="Info" statusMessage="A query request did not find a matching object in QuickBooks" />
If I go into QuickBooks I can see there are checks associated with the account so I'm not sure why this doesn't return a result.
Update 1: I rewrote this without the AccountFilter so it returned every check and I found checkes with the 800000F1-1362066981 account. It's also 10 MB so it's really hard to work with. :-)