Pre-1.0 · one maintainer · Stripe and cards only · no SDKs (client libraries) yet · no production users yet. Docs describe v0.12.0 (30 Nov 2026) · What’s new →
The invoice line item object
One line on an invoice: a base fee, a usage charge or another
charge. Amounts are whole numbers in the currency’s minor unit
(cents for USD). GET / returns the lines, and
POST / returns the line it added.
Example
Section titled “Example”{ "id": "hc_ili_dbj84baq3gpgqfoq5c4g", "invoice_id": "hc_inv_dbj84b2q3gpgqfoq5c40", "tenant_id": "hc_ten_dajqj02q3gpgqfoq5c00", "line_type": "usage", "meter_id": "hc_mtr_dajr122q3gpgqfoq5c10", "meter_unit": "tokens", "description": "Tokens (tokens)", "quantity": "12500000", "unit_amount_decimal": "0.0003", "amount_cents": 3750, "tax_rate": 0, "tax_amount_cents": 0, "total_amount_cents": 3750, "currency": "USD", "pricing_mode": "per_unit", "price_id": "hc_prc_dajr672q3gpgqfoq5c20", "billing_period_start": "2026-10-01T00:00:00Z", "billing_period_end": "2026-11-01T00:00:00Z", "created_at": "2026-11-01T00:05:00Z"}Fields
Section titled “Fields”| Field | Type | Always present | What it means |
|---|---|---|---|
id |
string | Yes | Unique identifier of the line, starting hc_ili_. |
invoice_ |
string | Yes | The invoice the line is on. |
tenant_ |
string | No | The account the line belongs to. Absent when empty. |
line_ |
enum | Yes | What an invoice line charges for. base_: a plan’s flat fee for the period. usage: metered usage, priced by a plan price. add_on: any other charge, such as a line you add to a draft (the default for those). One of: base_, usage, add_on. |
meter_ |
string | No | On a usage line, the meter that measured the usage. Absent on other lines. |
meter_ |
string | No | On a usage line, the meter’s unit (“tokens”, “seconds”, …), as it was when the line was written, so prices can be shown per unit the way the pricing pages show them (token rates read “$3.00 / 1M tokens”). Absent on other lines, and on usage lines written before releases recorded it. |
description |
string | Yes | The line’s text as printed on the invoice. A base fee reads like “Pro - base fee”; a usage line names the meter and its unit, or the labels its price takes, like “Tokens (tokens)”. |
quantity |
string | Yes | The line’s exact quantity as a decimal string, for example “3” or “1.5”. Line amounts stay whole cents. |
unit_ |
string | Yes | The unit price, a decimal string of cents at full precision, for example “0.3” for $0.003. On a usage line priced per_ it is that rate; on any other line it is amount_ ÷ quantity. Line amounts and totals stay whole cents. |
amount_ |
integer (int64) | Yes | The line’s amount before tax, in the currency’s minor unit (cents for USD). With tax-inclusive prices, it is the net amount after the tax is taken out. |
tax_ |
number (double) | Yes | Tax rate on the line as a percent, up to four decimal places (18.5 means 18.5%). |
tax_ |
integer (int64) | Yes | Tax on the line, in the currency’s minor unit (cents for USD). |
tax_ |
string | No | The tax jurisdiction the provider named for the line. Absent when none was given. |
tax_ |
string | No | The product tax code the line was taxed under (for Stripe Tax, a txcd_… code). Absent when none was used. |
tax_ |
string | No | Why the line was taxed as it was, in Stripe Tax’s words (standard_, reverse_, not_, customer_, product_, zero_ and others). prepaid_ is Hardcount’s own value, on a prepaid commit purchase line under the manual or Stripe Tax provider: the line is not taxed, and the usage the credit pays for is taxed when invoiced. Otherwise absent for providers other than Stripe Tax. |
total_ |
integer (int64) | Yes | The line’s amount plus its tax, in the currency’s minor unit (cents for USD). |
currency |
string | Yes | The line’s currency, the same as the invoice’s. |
pricing_ |
string | No | On a usage line, the shape of its price: per_, graduated or package. Absent on other lines. |
price_ |
string | No | On a usage line, the plan price that billed it. Absent on other lines. |
dimension_ |
object | No | On a usage line, the labels its price takes. Absent for a price that takes every event, and on other lines. |
billing_ |
string (date-time) | No | Start of the time the line bills for (included). Absent on lines with no period of their own, such as lines you add to a draft. |
billing_ |
string (date-time) | No | End of the time the line bills for (not included). Absent on lines with no period of their own. |
metadata |
object | No | Extra key-value data stored with the line. No API request sets it; it is absent when empty. |
created_ |
string (date-time) | Yes | When the line was written. |
commit_ |
integer (int64) | No | Marks the line as a prepaid commit purchase (credit the customer pays for up front): when the top-up is paid, the customer gets a credit grant of this many cents (in the invoice’s currency). It may differ from the line’s price: a discounted commit sells $10,000 of credit for $9,000. Only on the one line of a top-up (billing_ topup). Absent on other lines. |
credit_ |
integer | No | On a commit line: how many days the credit stays usable after the payment, copied from the account’s topup_ when the top-up was created, so a later change of the setting does not change it. Absent when the credit never expires, and on other lines. |
Stuck, or found a bug? Ask in Discussions · Open an issue