The invoice object
Lago automatically generates invoices for each of your customers at the end of a billing period. They list and summarize the fees generated by Lago for your customers. Subscription, usage-based and recurring fees are listed as invoice items.
Attributes
Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice’s record within the Lago system.
This ID helps in uniquely identifying and organizing the invoices associated with a specific customer. It provides a sequential numbering system specific to the customer, allowing for easy tracking and management of invoices within the customer’s context.
The unique number assigned to the invoice. This number serves as a distinct identifier for the invoice and helps in differentiating it from other invoices in the system.
The date when the invoice was issued. It is provided in the ISO 8601 date format.
The payment due date for the invoice, specified in the ISO 8601 date format.
The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
The type of invoice issued. Possible values are subscription
, one-off
or credit
.
The status of the invoice. It indicates the current state of the invoice
and can have two possible values: - draft
: the invoice is in the draft
state, waiting for the end of the grace period to be finalized. During
this period, events can still be ingested and added to the invoice. -
finalized
: the invoice has been issued and finalized. In this state,
events cannot be ingested or added to the invoice anymore. - voided
: the
invoice is considered as having zero value for reporting and is not
payable. Importantly, this status is final, meaning the invoice’s status
remains unalterable.
The status of the payment associated with the invoice. It can have one of
the following values: - pending
: the payment is pending, waiting for
payment processing in Stripe or when the invoice is emitted but users have
not updated the payment status through the endpoint. - succeeded
: the
payment of the invoice has been successfully processed. - failed
: the
payment of the invoice has failed or encountered an error during
processing.
The currency of the invoice issued.
The total sum of fees amount in cents. It calculates the cumulative amount of all the fees associated with the invoice, providing a consolidated value.
The sum of tax amount associated with the invoice, expressed in cents.
The total sum of all coupons discounted on the invoice. It calculates the cumulative discount amount applied by coupons, expressed in cents.
The total sum of all credit notes discounted on the invoice. It calculates the cumulative discount amount applied by credit notes, expressed in cents.
The total sum of all prepaid credits discounted on the invoice. It calculates the cumulative discount amount applied by prepaid credits, expressed in cents.
Subtotal amount, excluding taxes, expressed in cents. This field depends
on the version number. Here are the definitions based on the version: -
Version 1: is equal to the sum of fees_amount_cents
, minus
coupons_amount_cents
, and minus prepaid_credit_amount_cents
. - Version
2: is equal to the fees_amount_cents
. - Version 3: is equal to the
fees_amount_cents
, minus coupons_amount_cents
.
Subtotal amount, including taxes, expressed in cents. This field depends
on the version number. Here are the definitions based on the version: -
Version 1: is equal to the total_amount_cents
. - Version 2: is equal to
the sum of fees_amount_cents
and vat_amount_cents
. - Version 3: is
equal to the sum sub_total_excluding_taxes_amount_cents
and
taxes_amount_cents
The sum of the amount and taxes amount on the invoice, expressed in cents. It calculates the total financial value of the invoice, including both the original amount and any applicable taxes.
Contains the URL that provides direct access to the invoice PDF file. You can use this URL to download or view the PDF document of the invoice
The date when the payment dispute was lost. It is expressed in Coordinated Universal Time (UTC).
Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system.
Unique identifier assigned to the group that the fee belongs to
Unique identifier assigned to the invoice that the fee belongs to
Unique identifier assigned to the true-up fee when a minimum has been set to the charge. This identifier helps to distinguish and manage the true-up fee associated with the charge, which may be applicable when a minimum threshold or limit is set for the charge amount.
Unique identifier assigned to the parent fee on which the true-up fee is assigned. This identifier establishes the relationship between the parent fee and the associated true-up fee.
Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription.
ro
Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription.
Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription.
Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
The cost of this specific fee, excluding any applicable taxes.
The currency of this specific fee. It indicates the monetary unit in which the fee’s cost is expressed.
The cost of the tax associated with this specific fee.
The tax rate associated with this specific fee.
The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer.
The unit amount of the fee per unit, with precision.
The cost of this specific fee, including any applicable taxes.
The currency of this specific fee, including any applicable taxes.
The number of events that have been sent and used to charge the customer. This field indicates the count or quantity of events that have been processed and considered in the charging process.
Flag that indicates whether the fee was paid in advance. It serves as
a boolean value, where true
represents that the fee was paid in
advance (straightaway), and false
indicates that the fee was not
paid in arrears (at the end of the period).
Flag that indicates whether the fee was included on the invoice. It
serves as a boolean value, where true
represents that the fee was
included on the invoice, and false
indicates that the fee was not
included on the invoice.
The beginning date of the period that the fee covers. It is applicable
only to subscription
and charge
fees. This field indicates the
start date of the billing period or subscription period associated
with the fee.
The ending date of the period that the fee covers. It is applicable
only to subscription
and charge
fees. This field indicates the end
date of the billing period or subscription period associated with the
fee.
Indicates the payment status of the fee. It represents the current
status of the payment associated with the fee. The possible values for
this field are pending
, succeeded
, failed
, and refunded
.
The date and time when the fee was created. It is provided in Coordinated Universal Time (UTC) format.
The date and time when the payment for the fee was successfully processed. It is provided in Coordinated Universal Time (UTC) format.
The date and time when the payment for the fee failed to process. It is provided in Coordinated Universal Time (UTC) format.
The date and time when the payment for the fee was refunded. It is provided in Coordinated Universal Time (UTC) format
Unique identifier assigned to the transaction. This field is
specifically displayed when the fee type is charge
and the payment
for the fee is made in advance (pay_in_advance
is set to true
).
List of all unit amount details for calculating the fee.
Was this page helpful?