Invoices
Invoices represent a request for payment from a customer. Use them to bill for products and services, track amounts due and paid, and manage the invoice lifecycle from draft through finalization, delivery, and payment.
Each invoice includes one or more line items that describe the products and charges being billed. Use credit notes to reduce the amount owed on a draft or open invoice.
The Invoice object
- Name
object
- Type
- "invoice",
- Description
- Literal representing the object’s type.
- Name
id
- Type
- string,
- Description
- Unique identifier for the object.
- Name
live
- Type
- boolean,
- Description
- Has the value
trueif the object exists in a production environment or the valuefalseif the object exists in a sandbox environment.
- Name
created_at
- Type
- integer,
- Description
- Time at which the object was created. Measured in milliseconds since the Unix epoch.
- Name
amount_due
- Type
- integer,
- Description
- The amount owed on the invoice, net of any issued credit notes. Set when the invoice is finalized and does not decrease as payments are made; use
amount_paidto track payments.
- Name
amount_paid
- Type
- integer,
- Description
- The amount that has been paid on this invoice.
- Name
attachments
- Type
- array of Files or null,
- Description
- Expandable. Files related to the invoice that are shown to the customer.
- Name
billing_address
- Type
- object or null,
- Description
- The billing address for the invoice.
- Properties
- Name
credit_notes
- Type
- array of CreditNotes or null or null,
- Description
- Expandable. The credit notes issued against this invoice.
- Name
custom_fields
- Type
- object or null,
- Description
- Custom fields for the invoice.
- Name
customer
- Type
- string or Customer,
- Description
- Expandable. The customer associated with the invoice.
- Name
days_until_due
- Type
- integer or null,
- Description
- The number of days until the invoice is due. When the invoice is finalized, this will be used to calculate the due_date if set.
- Name
default_taxes
- Type
- array of objects or null,
- Description
- The default taxes used for line items without their own taxes.
- Properties
- Name
due_date
- Type
- integer or null,
- Description
- The due date for the invoice as a Unix timestamp in milliseconds.
- Name
external_sync
- Type
- object or null,
- Description
- The external system record linked to this invoice, if any.
- Properties
- Name
footer
- Type
- string or null,
- Description
- Footer text displayed on the invoice.
- Name
line_items
- Type
- array of LineItems or null,
- Description
- Expandable. The line items included in this invoice.
- Name
memo
- Type
- string or null,
- Description
- Internal memo for the invoice.
- Name
metadata
- Type
- object,
- Description
- A key-value store that is attached to the object. Useful for storing miscellaneous structured data for your integration’s internal use.
- Name
number
- Type
- string,
- Description
- The invoice number.
- Name
payment_link
- Type
- string or null,
- Description
- A link to a payment page for this invoice.
- Name
payments
- Type
- array of Payments or null or null,
- Description
- Expandable. The payments associated with the invoice.
- Name
shipping_details
- Type
- object,
- Properties
- Name
status
- Type
- enum,
- Description
- The status of the invoice.
- Name
subtotal
- Type
- integer,
- Description
- The amount of the invoice after discounts and before taxes.
- Name
total
- Type
- integer,
- Description
- The total amount of the invoice after discounts and taxes.
- Name
total_taxes
- Type
- integer,
- Description
- The total amount of taxes on the invoice.
- Name
updated_at
- Type
- integer,
- Description
- Time at which the object was last updated. Measured in milliseconds since the Unix epoch.
The Invoice object
Get an invoice
Retrieve an invoice by its ID.
Optional parameters
- Name
expand
- Type
- object,
- Properties
Returns
Returns the invoice object.
Get an invoice
Response example
List all invoices
Retrieve a paginated list of invoices.
Optional parameters
- Name
expand
- Type
- object,
- Properties
- Name
ending_before
- Type
- string,
- Description
- A cursor for use in pagination.
ending_beforeis an object ID that results will end before. Used to move backward through the list.
- Name
starting_after
- Type
- string,
- Description
- A cursor for use in pagination.
starting_afteris an object ID that results will start after. Used to move forward through the list.
- Name
limit
- Type
- number, at least 1, at most 1000, default is 50
- Description
- Maximum number of objects to return.
- Name
filters
- Type
- object, object, or object,
- Description
- Filters to apply to the list. Combine multiple conditions with
andandor. - Properties
Returns
Returns a list of invoice objects.
List all invoices
Response example
Create an invoice
Create a new invoice in draft status. Add line items, set billing details, and finalize the invoice when ready to send or collect payment.
Required parameters
- Name
customer
- Type
- string,
- Description
- The customer who this invoice is for.
- Name
line_items
- Type
- array of object or object,
- Description
- The line items for this invoice.
Optional parameters
- Name
expand
- Type
- object,
- Properties
- Name
billing_address
- Type
- object or null,
- Description
- The billing address for this invoice.
- Properties
- Name
shipping_details
- Type
- object or null,
- Description
- Shipping details for this invoice.
- Properties
- Name
due_date
- Type
- integer or null,
- Description
- The due date for this invoice as a Unix timestamp in milliseconds.
- Name
days_until_due
- Type
- integer or null,
- Description
- The number of days until the invoice is due. When the invoice is finalized, this will be used to calculate the due_date if set.
- Name
metadata
- Type
- object or null,
- Description
- A key-value store that is attached to the object. Useful for storing miscellaneous structured data for your integration’s internal use.
- Name
attachments
- Type
- array of string or null,
- Description
- The IDs of files to attach to this invoice.
- Name
memo
- Type
- string or null,
- Description
- Internal memo for the invoice.
- Name
footer
- Type
- string or null,
- Description
- Footer text displayed on the invoice.
- Name
custom_fields
- Type
- object or null,
- Description
- Custom fields for the invoice.
- Name
default_taxes
- Type
- array of objects,
- Description
- Default taxes to apply to all line items that don't specify their own taxes.
- Properties
Returns
Returns the invoice object.
Create an invoice
Response example
Update an invoice
Update an invoice’s customer, line items, billing details, or metadata. Only draft invoices can be fully updated.
Optional parameters
- Name
expand
- Type
- object,
- Properties
- Name
customer
- Type
- string,
- Description
- The ID of the customer for this invoice.
- Name
billing_address
- Type
- object or null,
- Description
- The billing address for this invoice.
- Properties
- Name
shipping_details
- Type
- object or null,
- Description
- Shipping details for this invoice.
- Properties
- Name
line_items
- Type
- array of object or object,
- Description
- The line items for this invoice. Replaces all existing line items.
- Name
due_date
- Type
- integer or null,
- Description
- The due date for this invoice as a Unix timestamp in milliseconds.
- Name
days_until_due
- Type
- integer or null,
- Description
- The number of days until the invoice is due. When the invoice is finalized, this will be used to calculate the due_date if set.
- Name
metadata
- Type
- object or null,
- Description
- A key-value store that is attached to the object. Useful for storing miscellaneous structured data for your integration’s internal use.
- Name
attachments
- Type
- array of string or null,
- Description
- The IDs of files to attach to this invoice. Replaces all existing attachments.
- Name
memo
- Type
- string or null,
- Description
- Internal memo for the invoice.
- Name
footer
- Type
- string or null,
- Description
- Footer text displayed on the invoice.
- Name
custom_fields
- Type
- object or null,
- Description
- Custom fields for the invoice.
- Name
default_taxes
- Type
- array of objects,
- Description
- Default taxes to apply to all line items that don't specify their own taxes. Only updateable on draft invoices.
- Properties
Returns
Returns the invoice object.
Update an invoice
Response example
Delete an invoice
Delete an invoice
Response example
Finalize an invoice
Finalize a draft invoice, locking its details and making it ready to send or pay.
Returns
Returns the invoice object.
Finalize an invoice
Response example
Send an invoice
Send an invoice email notification to the customer.
Optional parameters
- Name
email
- Type
- string or null,
- Description
- Email address to send the invoice notification to. Overrides the invoice customer's email. Falls back to the customer's email when omitted.
Returns
Returns the invoice object.
Send an invoice
Response example
Mark an invoice as paid
Mark an invoice as paid when payment was collected outside of Bias.
Returns
Returns the invoice object.
Mark an invoice as paid
Response example
Mark an invoice as uncollectible
Mark an invoice as uncollectible when payment is no longer expected.
Returns
Returns the invoice object.