The invoice object
This object represents an invoice generated by Lago for a specific customer. This invoice summarizes the fees generated by a subscription, usage-based charges, prepaid credit purchases, or one-off invoices.
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.
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 type of invoice issued. Possible values are subscription
, one-off
, credit
or progressive_billing
.
subscription
, add_on
, credit
, one_off
, progressive_billing
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 has been issued and subsequently voided. In this state, events cannot be ingested or added to the invoice anymore.failed
: during an attempt of finalization of the invoice, an error happened. This invoice will have an array of error_details, explaining, in which part of the system an error happened and how it's possible to fix it. This invoice can't be edited or updated, only retried. This action will discard current error_details and will create new ones if the finalization failed again.
draft
, finalized
, voided
, failed
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.
pending
, succeeded
, failed
The currency of the invoice issued.
AED
, AFN
, ALL
, AMD
, ANG
, AOA
, ARS
, AUD
, AWG
, AZN
, BAM
, BBD
, BDT
, BGN
, BIF
, BMD
, BND
, BOB
, BRL
, BSD
, BWP
, BYN
, BZD
, CAD
, CDF
, CHF
, CLF
, CLP
, CNY
, COP
, CRC
, CVE
, CZK
, DJF
, DKK
, DOP
, DZD
, EGP
, ETB
, EUR
, FJD
, FKP
, GBP
, GEL
, GIP
, GMD
, GNF
, GTQ
, GYD
, HKD
, HNL
, HRK
, HTG
, HUF
, IDR
, ILS
, INR
, ISK
, JMD
, JPY
, KES
, KGS
, KHR
, KMF
, KRW
, KYD
, KZT
, LAK
, LBP
, LKR
, LRD
, LSL
, MAD
, MDL
, MGA
, MKD
, MMK
, MNT
, MOP
, MRO
, MUR
, MVR
, MWK
, MXN
, MYR
, MZN
, NAD
, NGN
, NIO
, NOK
, NPR
, NZD
, PAB
, PEN
, PGK
, PHP
, PKR
, PLN
, PYG
, QAR
, RON
, RSD
, RUB
, RWF
, SAR
, SBD
, SCR
, SEK
, SGD
, SHP
, SLL
, SOS
, SRD
, STD
, SZL
, THB
, TJS
, TOP
, TRY
, TTD
, TWD
, TZS
, UAH
, UGX
, USD
, UYU
, UZS
, VND
, VUV
, WST
, XAF
, XCD
, XOF
, XPF
, YER
, ZAR
, ZMW
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 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.
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
, minuscoupons_amount_cents
, and minusprepaid_credit_amount_cents
. - Version 2: is equal to the
fees_amount_cents
. - Version 3 & 4: is equal to the
fees_amount_cents
, minuscoupons_amount_cents
The sum of tax amount associated with the invoice, expressed in 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
andtaxes_amount_cents
. - Version 3 & 4: is equal to the sum
sub_total_excluding_taxes_amount_cents
andtaxes_amount_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.
The usage already billed in previous invoices. Only apply to progressive_billing
and subscription
invoices.
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.
The date of the invoice creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the invoice object was created
The date of the invoice update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the invoice object was updated
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 date when the payment dispute was lost. It is expressed in Coordinated Universal Time (UTC).
The payment due date for the invoice, specified in the ISO 8601 date format.
Specifies if the payment is considered as overdue.
The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
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 customer on which the invoice applies. It refers to the customer account or entity associated with the invoice.
Was this page helpful?