An Invoice represents an invoice that a Business has collected for goods and services provided. Invoices are used to pass information about sales and accounts receivable into Layer.

Attributes

id
string
required

Unique identifier for the invoice.

type
string
required

Resource type. Value will be “Invoice”.

external_id
string

Unique ID of the invoice in your system for linking purposes.

business_id
string
required

ID of the Business that generated the invoice.

status
enum
required

Status of the invoice. Values can be: PENDING, SENT, PARTIALLY_PAID, PAID, PARTIALLY_WRITTEN_OFF, WRITTEN_OFF, VOIDED

sent_at
ISO8601 timestamp
required

When the invoice was sent by the business to the recipient.

due_at
ISO8601 timestamp

When the invoice is due.

paid_at
ISO8601 timestamp

When the invoice was paid.

voided_at
ISO8601 timestamp

When the invoice was voided. Voiding excludes the invoice from accounting.

invoice_number
string

Number for the invoice for display to end-users.

customer
Customer object
required

Customer object associated with the invoice.

line_items
array of InvoiceLineItem objects
required

Line items making up the invoice.

subtotal
integer
required

Subtotal of all invoice line items in cents.

additional_discount
integer

Additional discount applied to the whole invoice in addition to individual line items.

total_discount
integer

Sum of all discount amounts across the invoice line items and any additional discounts in cents.

additional_sales_taxes
Array of SalesTax objects
total_tax
integer

Sum of all taxes across the invoice line items and any additional taxes in cents.

tips
integer

Tips included by the buyer, in cents.

tips_account
object

The Account Identifier for a tips account. If not specified, tips will be attributed to the Chart of Account’s default tips account, default a liability account. Alternate accounts can be specified in case tips should be tracked as revenue.

total
integer
required

Total amount of the invoice in cents.

outstanding_balance
integer
required

The remaining balance on the invoice after factoring in all previous invoice payments and write-offs.

payment_allocations
array of InvoicePaymentAllocation objects

Payments made by a customer are allocated toward one or many invoices. This list shows which payments have been been allocated towards this invoice. The most common case is that there is a 1:1 relationship between a payment and an invoice, in which case the allocation’s amount will match the payment’s amount.

write_offs
array of Invoice Write-Off objects

Write-offs applied to the invoice. See the Write-Off object for more information.

imported_at
ISO8601 timestamp
required

Time when the invoice was first imported into Layer. Eligible sort key.

updated_at
ISO8601 timestamp
required

Time when the invoice was last updated in Layer. Eligible sort key.