View Billing Documents
The List and Retrieve operations of Invoice, Credit Memo, and Debit Memo are invoked when end subscribers want to view their billing documents or the details of a single billing document.
List billing documents
Use the following operations to view invoices, credit memos, or debit memos in your tenant:
To further filter the results, specify the filter[]
query parameter. For example, to list all posted invoices, you can set the filter[]
parameter to state.EQ:posted
. For the full list of filterable fields on each object, see Filter Lists.
List invoices
The following example lists all invoices in your tenant:
curl --request GET \
--url 'https://rest.apisandbox.zuora.com/v2/invoices' \
--header 'Authorization: Bearer 406c9801b1cb4899a8dec61ed4fb5111' \
--header 'Content-Type: application/json'
List credit memos
The following example lists all credit memos in your tenant:
curl --request GET \
--url https://rest.apisandbox.zuora.com/v2/credit_memos \
--header 'Authorization: Bearer e6f7611768fd4297aade3e9e68a56f8f' \
--header 'Content-Type: application/json'
List debit memos
The following example lists all debit memos in your tenant:
curl --request GET \
--url https://rest.apisandbox.zuora.com/v2/debit_memos \
--header 'Authorization: Bearer 5e8a3e540235449cb6615465411f445b' \
--header 'Content-Type: application/json'
Retrieve a billing document
The following example retrieves all invoices associated with an account (account_id
= 8ad09b7d8292b85d0182a4d6f875225a):
curl -X GET "https://rest.apisandbox.zuora.com/v2/billing_documents?filter[]=type.EQ:invoice&filter[]=account_id.EQ:8ad09b7d8292b85d0182a4d6f875225a"
-H "Authorization: Bearer 72db3da461ba40c69fb1c2dc440ad204"
-H "Content-Type: application/json"
List<String> filterParameters = new ArrayList<String>();
filterParameters.add("type.EQ:invoice");
filterParameters.add("account_id.EQ:8ad09b7d8292b85d0182a4d6f875225a");
BillingDocumentListResponse accountInvoices = zuoraClient.billingDocuments().getBillingDocuments(null, null, filterParameters);
System.out.println(accountInvoices);
const queries = {
filter: [
'type.EQ:invoice',
'account_id.EQ:8ad09b7d8292b85d0182a4d6f875225a'
]
};
const invoices = await zuoraClient.billingDocuments.getBillingDocuments(queries);
console.log(invoices);
Retrieve a billing document
Use the following operations to retrieve an invoice, a credit memos, or a debit memos in your tenant:
The following example retrieves an invoice by the invoice number:
curl --request GET \
--url https://rest.apisandbox.zuora.com/v2/invoices/INV00009385 \
--header 'Authorization: Bearer 86e39b1be25344da98cc45913fc7efa3' \
--header 'Content-Type: application/json'
BillingDocument billingDocument = zuoraClient.billingDocuments().getBillingDocument("INV00009385", null);
System.out.println(billingDocument);
const billingDocument = await zuoraClient.billingDocuments.getBillingDocument('INV00009385');
console.log(billingDocument);