How can I identify which invoices a payment has been applied to through the Query API.

Hi,

We're having trouble finding any field we can use to match payments to invoices.

For example, in the Developer sandbox, we have payment number 18 for $7,181. If I click on “Applications” I can then see which invoices this payment has been applied to, and how much of this payment has been applied to each invoice.

The problem is, I cannot replicate this in the API - I'm trying to use the query API and it's not giving me the same results as the UI.

E.g.

If I look at the applications for payment 18 I can see that $240 was applied to “Invoice #3, line item 1, Drug Awareness Video”, but via the Query API for Accounts Receivable, I can't find the same detail.

Does anyone know how to extract this data correctly?

Thanks

Comments

  • @Matt Evans
    If you can use Query to out the desired fields, then you can use Query execution job (by ID) to output a file with the same fields.

    Create the Query in webview, get the System Record ID for the query, and then use that ID as the parameter in your POST request

  • @Bryce Howard thank you, there are still some details we can't see. E.g. If payment 18 is applied to 18 invoices and 14 charges, there's no way (that we can see) that Query can show us the individual applied amounts. Do you know which fields we should be using?

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 Facilitator 3 Raiser's Edge NXT Fall 2025 Product Update Briefing Badge

    @Matt Evans
    SKY API endpoint does not exists for AR yet, so the Payment number 18 (assuming you mean the payment system record id 18 that shows up in the URL) is not going to be very useful to get all the details you want.

    Bryce suggestion is a solid recommendation, you need first dig into Query in webview and use it to determine how you are going to get the data you need before trying to run Query API to get the result. Are you famailiar with all the one-to-many relationships between payment, invoice and charge? this is critical so you can properly execute query output that is “useable” rather than “over duplicated records”.

  • @Alex Wong thanks - we are looking at the Query API for this, and there doesn't seem to be any way to extract this information, I'm looking for either confirmation that this is impossible or some indication of how to identify the links.

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 Facilitator 3 Raiser's Edge NXT Fall 2025 Product Update Briefing Badge

    @Matt Evans
    I don't use AR in my org, so while I cannot confirm, I'm almost certain you can do this in Query given what is possible in GL and AP.

    Hoping someone else with knowledge of AR to help you out, but I think it lies on you to know your data and how it is structured as well. The most important is to use Query (IF you had done it in dbview previously, it is the same in webview now) to filter and export on information. if you are able to get the data you need from Query, then next step is to understand the one-to-many relationship of the records and then do multiple queries to properly get all the data out without unneccessary duplicates.