A ReceivePaymentQuery answers what each payment was applied to (AppliedToTxnRet) only with IncludeLineItems true

Observed 2026-10-09 on QuickBooks Enterprise Solutions 24.0 (US), reporting qbXML 17.0.

A ReceivePaymentQueryRq answers each payment's AppliedToTxnRet elements, the invoices it was applied to, only when the request sends IncludeLineItems true. Without it, an applied payment answers its header only, with no AppliedToTxnRet at all. QuickBooks counts the applications as the payment's line items, although the XSD does not place them in a line list.

This query asked for one payment that applied 1.00 to an invoice:

qbXML
<ReceivePaymentQueryRq>
  <TxnID>4F88-1791595425</TxnID>
</ReceivePaymentQueryRq>

The answer, cut here to its TxnID and its last fields, had no AppliedToTxnRet, although UnusedPayment 0.00 shows the money was still applied:

qbXML
<ReceivePaymentRet>
<TxnID>4F88-1791595425</TxnID>
<UnusedPayment>0.00</UnusedPayment>
<UnusedCredits>0.00</UnusedCredits>
<ExternalGUID>{9229795D-B2A7-4D54-A724-0D2A5FD048BD}</ExternalGUID>
</ReceivePaymentRet>

With <IncludeLineItems>true</IncludeLineItems>, the same customer's payments listed their applications:

qbXML
<ReceivePaymentRet>
<TxnID>4F1C-1791563863</TxnID>
<UnusedPayment>0.00</UnusedPayment>
<UnusedCredits>0.00</UnusedCredits>
<ExternalGUID>{015DDBA9-5E1B-4478-95A5-A06755188A9E}</ExternalGUID>
<AppliedToTxnRet>
<TxnID>4F0D-1791563723</TxnID>
<TxnType>Invoice</TxnType>
<TxnDate>2026-10-09</TxnDate>
<RefNumber>INV-0002</RefNumber>
<BalanceRemaining>0.00</BalanceRemaining>
<Amount>50.00</Amount>
</AppliedToTxnRet>
</ReceivePaymentRet>

A query by modified date answered the same way: without IncludeLineItems, none of the applied payments had an AppliedToTxnRet. The ReceivePaymentAdd answer does include them.

What to do

Send <IncludeLineItems>true</IncludeLineItems> on any ReceivePaymentQueryRq whose answer you use to see which invoices a payment paid. A payment with no AppliedToTxnRet in an answer without it is not an unapplied payment; check UnusedPayment or query again with line items.

Not observed

  • BillPaymentCheckQuery and BillPaymentCreditCardQuery, which also answer AppliedToTxnRet.
  • IncludeRetElement naming AppliedToTxnRet without IncludeLineItems.

QuBe Sync is a JSON API for QuickBooks Desktop that is built on what these findings show.