Search code examples
intuit-partner-platform

Querying payments for a specific Invoice only?


I'm using the Quickbooks API and the query function trying to get back payments for a specific Invoice.

It looks like that data is under the Line > LinkedTxn section of the response, but I'm not able, so far, to query anything specific in that section.

Is it possible to do so? It doesn't look like QB's API allows joins as it isn't standard SQL as far as I can tell.

Any help would be appreciated!


Solution

  • Is it possible to do so?

    Not directly, no.

    The closest you can get is to query for the invoice first so that you know the CustomerRef for the invoice, and then query for all payments for the customer. Then, process the list of payments within your app to filter them down to just the specific invoice you want payment for.

    You can query for payments for a specific customer like this:

    SELECT * FROM Payment WHERE CustomerRef = '5'