Create invoice line item
Creates a line item on a one-off invoice, optionally with sub-line items. When sub-line items are provided, their amounts must sum to the line item amount.
Path Parameters
Body
Schema for creating a one-off line item on an existing one-off invoice. When subLineItems is provided, the sum of usage × price (rounded to whole cents per row) must equal amount.
Response
Schema representing an invoice line item. Monetary amounts are integers in cents; the price breakdown lives in subLineItems.
What the line item charges for: usage_based (metered resource consumption), license_based (a license's reported count billed in full), fixed (recurring fixed charge of a plan), custom (custom plan charge, priced by a calculator that Aira writes for the tenant), minimum_commitment (plan-level minimum top-up), contract_minimum_commitment (contract-level minimum top-up), credit_purchase (credit pool top-up), additional_charge (extra charge added manually), one_off (line item of a one-off invoice), or tax_gross_up (tax gross-up charge).
credit_purchase, contract_minimum_commitment, minimum_commitment, fixed, usage_based, license_based, custom, additional_charge, one_off, tax_gross_up How to read totalUsage, and the usage of each sub-line item that has no usageFormat of its own: unit means a count of resource units or a fixed charge quantity; currency means a monetary base amount in cents. Null when the line item has no single usage, as a custom line item whose sub-line items bill different kinds of volume, each with its own usageFormat.
unit, currency, null Pricing metadata for the line item, where the shape is keyed by type. Always present, but null for line items without pricing metadata: credit_purchase, additional_charge, one_off, and tax_gross_up. It is populated for fixed (the billing timing), usage_based, license_based, minimum_commitment, contract_minimum_commitment, and custom (the definition and the calculation memory) line items.
- Fixed
- Usage-based
- License-based
- Contract minimum commitment
- Minimum commitment
- Custom