- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Querying Payment using SOAP API
The documentation here (https://knowledgecenter.zuora.com/DC_Developers/SOAP_API/E1_SOAP_API_Object_Reference/Payment) indicates that the Payment object contains many properties, one of which is InvoiceNumber. It also indicates that the Payment object can be used with a query() call. However, when I issue this query:
select InvoiceNumber from Payment
I get the error: "invalid field for query: Payment.InvoiceNumber".
Am I doing something wrong?
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Querying Payment using SOAP API
Hi Jerrade,
The field "InvoiceNumber" only supports the create() call, so it won't be available for other calls including query()
Hope this helps, thank you!
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Querying Payment using SOAP API
Ah, I didn't notice that column somehow. Thanks!
Is there any way to get Invoices and their Payments in a single call? Or do I have to get the Invoice first, and then query its Payments separately?
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Querying Payment using SOAP API
You're very welcome!
As for querying invoice and payment in a single call, you can give this a try.
In this link: https://www.zuora.com/developer/api-reference/#operation/Action_POSTquery, you can use REST API to send a query. I'm thinking you can try this query:
Select Id, AccountId, Amount, PaymentAmount, Status From Invoice where AccountId = 'ACCOUNT_ID'
By using "Action", you can query SOAP object. For the example query above it would be the Invoice object, the available fields are documented here: https://knowledgecenter.zuora.com/DC_Developers/SOAP_API/E1_SOAP_API_Object_Reference/Invoice
Hope this works for your use case.
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √