Skip to main content
Vindicia Knowledge Center

The invoice (and invoice item) object

The invoice (and invoice item) object

Attributes

Invoice

Name Type Description
object string Value is “Invoice”
id string A CashBox-specified unique identifier for the invoice. aka Invoice Number.
invoice_date datetime The billing date of the invoice. Typically the 1st day of the billed service period. This is the day when the invoice status goes from Open to Due.
due_date datetime The due date of the invoice. Typically the same as the “invoice date” unless Net Terms are specified for the Subscription.
billing_service_period_start datetime Start of the billing/service period covered by this invoice.
billing_service_period_end datetime End of the billing/service period covered by this invoice.
status enum The status of the invoice. Values can be Open, Due, Paid, Overdue, Written Off.
invoice_currency string An ISO 4217 Currency Code. An invoice’s charges must be in a single currency.
original_invoice_amount decimal The original net total of the invoice (in the currency identified as the invoice_currency).
invoice_balance decimal The current balance due of the invoice (in the currency identified as the invoice_currency).
gross_charges_total decimal The original gross charges total of the invoice (in the currency identified as the invoice_currency). Represents the pre-tax, pre-discount sub-total of all charge/purchase items.
tax_charges_total decimal The original tax total of the invoice (in the currency identified as the invoice_currency).
credit_total decimal The original discount and credit total of the invoice (in the currency identified as the invoice_currency).
payments_received_total decimal The current currency total of all payments successfully processed against this invoice.
invoice_line_items InvoiceItem[] The purchase or charge-based line items for the invoice.
invoice_tax_items InvoiceItem[] The tax-related line items for the invoice.
invoice_credit_items InvoiceItem[] The discount or credit line items for the invoice.
invoice_payments Transaction[] Transactions which paid some or all of the invoice balance.
account Account The account invoiced. Minified: includes id and vid only
subscription Subscription The subscription for which this invoice bills. Minified: includes id and vid only
billing_sequence integer The subscription’s billing cycle for which this invoice charges. As a zero-based index, this indicates the renewal number.
invoice_terms integer InvoiceTerms from the owning subscription. Represents Days after the invoice date at which a bill is considered delinquent, if the AutoBill payment method is of type MerchantAcceptedPayment. The value will be undefined for all other payment method types.
affiliate string Affiliate or channel identifier, if any, under which the subscription was submitted.
sub_affiliate string A more granular or subordinate affiliate identifier.
metadata hash A set of key/value pairs that you can attach to an object. Useful for storing additional information. Invoice metadata is be inherited from the owning Subscription’s metadata.

Invoice Item

Name Type Description
object string Value is “InvoiceItem”
index_number integer Sequential index of all items on the invoice.
type enum The type of line item. Values can be RecurringCharge,Tax,Payment,Credit.
sku integer The SKU or unique identifier of the product purchased with this item (for one-time transactions this is an ad-hoc value.
description string Merchant-provided name or inherited description of the product purchased or line item explanation.
quantity integer The unit quantity for the item; for license-based products this is the license/seat quantity.
unit_amount decimal currency amount for a single quantity unit of the item
tax_classification string tax classification of the invoice item
item_added datetime The date and time the item was added to the subscription.
item_removed datetime The date and time the item was removed from the subscription.
item_serviceperiod_start datetime The start date for the period the charge on this item covers.
item_serviceperiod_end datetime The end date for the period the charge on this item covers.
subscription_item_id SubscriptionItem SubscriptionItem associated with this item.
  • cURL
  • Java
Example Object
{
    "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"
    }
 }
          
{
    "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