Skip to main content
Vindicia Knowledge Center

List invoices

List invoices

Retrieves a list of Invoices (all or filtered). This can be used to get a cross-account list of invoices, or for a given subscription using the “subscription” query parameter (see example). Note: Additional filters will be added (as Query Parameters) shortly.

GET https://api.vindicia.com/invoices

Route (URL) Parameters

None.

Query Parameters

Parameter Default Description Required
limit 20 A limit on the number of objects to be returned, between 1 and 100. No
starting_after none A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. No
ending_before none A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. No
account none Limit the invoice list to a specified account. No
subscription none Limit the invoice list to a specified subscription. No

Accepts

None.

Returns

JSON A list array with a data property that contains an array of up to limit invoices, starting after the specified starting_after invoice (or ending before the specified ending_before invoice). Each entry in the array is a full Invoice object. If no more Invoices are available, the resulting array will be empty. This request should never throw an error.

A list of Invoice objects matching the query. Also:

  • “total_count”: Integer count of the number of Invoices in the returned list.
  • “url”: The query string provided in the request
  • “next”: The route (partial URL) to the next Invoice object (string to select the “next”); included id should match that of the last object returned here
  • “previous”: The route (partial URL) to the previous Invoice object (string to select the “previous”); included id should match that of the first object returned here
  • cURL
  • Java
Example Request
curl -X GET  \
-u acaff38d462f9430d5cbcbaf:a575771fc679b9de \
"https://api.prodtest.vindicia.com/invoices/sub_1234-00000004"
          
The above command returns JSON structured like this:
{
    "object": "Invoice",
    "id": "sub_1234-00000004",
    "invoice_date": "2016-06-16T00:00:00-07:00",
    "due_date": "2016-06-16T00:00:00-07:00",
    "billing_service_period_start": "2016-06-16T00:00:00-07:00",
    "billing_service_period_end": "2016-07-15T23:59:59-07:00",
    "status": "Paid",
    "invoice_currency": "USD",
    "original_invoice_amount": 15,
    "invoice_balance": 0,
    "gross_charges_total": 15,
    "tax_charges_total": 0,
    "credit_total": 0,
    "payments_received_total": 15,
    "invoice_line_items": {
       "object": "List",
       "data": [
          {
             "object": "InvoiceItem",
             "index_number": 0,
             "type": "RecurringCharge",
             "sku": "prod_1234",
             "description": "Product 1",
             "quantity": 1,
             "unit_amount": 0,
             "tax_classification": "TaxExempt",
             "item_added": "2016-06-16T00:00:00-07:00",
             "item_removed": null
          },
          {
             "object": "InvoiceItem",
             "index_number": 1,
             "type": "RecurringCharge",
             "sku": "prod_1235",
             "description": "Product 2",
             "quantity": 1,
             "unit_amount": 5,
             "tax_classification": "TaxExempt",
             "item_added": "2016-06-16T13:56:35-07:00",
             "item_removed": null
          },
          {
             "object": "InvoiceItem",
             "index_number": 2,
             "type": "RecurringCharge",
             "sku": "bZ3oRYFwBNcx7sNtZGCZQBGS1XY",
             "description": "Test Product Description",
             "quantity": 1,
             "unit_amount": 10,
             "tax_classification": "TaxExempt",
             "item_added": "2016-06-16T13:56:35-07:00",
             "item_removed": null
          }
       ],
       "total_count": 3
    },
    "invoice_tax_items": {
       "object": "List",
       "data": [
          {
             "object": "InvoiceItem",
             "index_number": 3,
             "type": "Tax",
             "sku": "VIN_SALES_TAX",
             "description": "Sales Tax Total",
             "quantity": 1,
             "unit_amount": 0,
             "tax_classification": "TaxExempt",
             "item_added": "2016-06-16T13:56:35-07:00",
             "item_removed": null
          }
       ],
       "total_count": 1
    },
    "invoice_payments": {
       "object": "List",
       "data": [
          {`...transaction...`}
       ],
       "total_count": 1
    },
    "account": {
       "object": "Account",
       "id": "cust_1234",
       "vid": "11b9b85935256c8b0a1351298ec9c7b88047061a"
    },
    "subscription": {
       "object": "Subscription",
       "id": "sub_1234",
       "vid": "566baf52d8add85a7c796e16a7b542fc3eecf583"
    },
    "billing_sequence": 5,
    "invoice_terms": null,
    "affiliate": null,
    "sub_affiliate": null,
    "metadata": {
       "from_subscription": "1084518"
    }
 }
          
import com.vindicia.client.CashBox;
CashBox.apiKey = "acaff38d462f9430d5cbcbaf:a575771fc679b9de";
Invoice.fetch( "sub_1234-00000004");
           
The above command returns JSON structured like this:
{
    "object": "Invoice",
    "id": "sub_1234-00000004",
    "invoice_date": "2016-06-16T00:00:00-07:00",
    "due_date": "2016-06-16T00:00:00-07:00",
    "billing_service_period_start": "2016-06-16T00:00:00-07:00",
    "billing_service_period_end": "2016-07-15T23:59:59-07:00",
    "status": "Paid",
    "invoice_currency": "USD",
    "original_invoice_amount": 15,
    "invoice_balance": 0,
    "gross_charges_total": 15,
    "tax_charges_total": 0,
    "credit_total": 0,
    "payments_received_total": 15,
    "invoice_line_items": {
       "object": "List",
       "data": [
          {
             "object": "InvoiceItem",
             "index_number": 0,
             "type": "RecurringCharge",
             "sku": "prod_1234",
             "description": "Product 1",
             "quantity": 1,
             "unit_amount": 0,
             "tax_classification": "TaxExempt",
             "item_added": "2016-06-16T00:00:00-07:00",
             "item_removed": null
          },
          {
             "object": "InvoiceItem",
             "index_number": 1,
             "type": "RecurringCharge",
             "sku": "prod_1235",
             "description": "Product 2",
             "quantity": 1,
             "unit_amount": 5,
             "tax_classification": "TaxExempt",
             "item_added": "2016-06-16T13:56:35-07:00",
             "item_removed": null
          },
          {
             "object": "InvoiceItem",
             "index_number": 2,
             "type": "RecurringCharge",
             "sku": "bZ3oRYFwBNcx7sNtZGCZQBGS1XY",
             "description": "Test Product Description",
             "quantity": 1,
             "unit_amount": 10,
             "tax_classification": "TaxExempt",
             "item_added": "2016-06-16T13:56:35-07:00",
             "item_removed": null
          }
       ],
       "total_count": 3
    },
    "invoice_tax_items": {
       "object": "List",
       "data": [
          {
             "object": "InvoiceItem",
             "index_number": 3,
             "type": "Tax",
             "sku": "VIN_SALES_TAX",
             "description": "Sales Tax Total",
             "quantity": 1,
             "unit_amount": 0,
             "tax_classification": "TaxExempt",
             "item_added": "2016-06-16T13:56:35-07:00",
             "item_removed": null
          }
       ],
       "total_count": 1
    },
    "invoice_payments": {
       "object": "List",
       "data": [
          {`...transaction...`}
       ],
       "total_count": 1
    },
    "account": {
       "object": "Account",
       "id": "cust_1234",
       "vid": "11b9b85935256c8b0a1351298ec9c7b88047061a"
    },
    "subscription": {
       "object": "Subscription",
       "id": "sub_1234",
       "vid": "566baf52d8add85a7c796e16a7b542fc3eecf583"
    },
    "billing_sequence": 5,
    "invoice_terms": null,
    "affiliate": null,
    "sub_affiliate": null,
    "metadata": {
       "from_subscription": "1084518"
    }
 }
           

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top