Skip to main content
Vindicia Knowledge Center

Fetch a specific invoice

Fetch a specific invoice

Retrieves a specific Invoice.

Route (URL) Parameters

Parameter Default Description Required
invoice n/a The id of the Invoice to retrieve Yes

Query Parameters

None.

Accepts

None.

Returns

JSON A full Invoice object.

  • 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