lago_id
string
required

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.

number
string
required

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.

issuing_date
string
required

The date when the invoice was issued. It is provided in the ISO 8601 date format.

invoice_type
enum<string>
required

The type of invoice issued. Possible values are subscription, one-off, credit or progressive_billing.

Available options:
subscription,
add_on,
credit,
one_off,
progressive_billing
status
enum<string>
required

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.
Available options:
draft,
finalized,
voided,
failed
payment_status
enum<string>
required

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.
Available options:
pending,
succeeded,
failed
currency
enum<string>
required

The currency of the invoice issued.

Available options:
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
fees_amount_cents
integer
required

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.

coupons_amount_cents
integer
required

The total sum of all coupons discounted on the invoice. It calculates the cumulative discount amount applied by coupons, expressed in cents.

credit_notes_amount_cents
integer
required

The total sum of all credit notes discounted on the invoice. It calculates the cumulative discount amount applied by credit notes, expressed in cents.

sub_total_excluding_taxes_amount_cents
integer
required

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 & 4: is equal to the fees_amount_cents, minus coupons_amount_cents
taxes_amount_cents
integer
required

The sum of tax amount associated with the invoice, expressed in cents.

sub_total_including_taxes_amount_cents
integer
required

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 taxes_amount_cents.
  • Version 3 & 4: is equal to the sum sub_total_excluding_taxes_amount_cents and taxes_amount_cents
prepaid_credit_amount_cents
integer
required

The total sum of all prepaid credits discounted on the invoice. It calculates the cumulative discount amount applied by prepaid credits, expressed in cents.

progressive_billing_credit_amount_cents
integer
required

The usage already billed in previous invoices. Only apply to progressive_billing and subscription invoices.

total_amount_cents
integer
required

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.

version_number
integer
required
sequential_id
integer

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.

payment_dispute_lost_at
string

The date when the payment dispute was lost. It is expressed in Coordinated Universal Time (UTC).

payment_due_date
string

The payment due date for the invoice, specified in the ISO 8601 date format.

payment_overdue
boolean

Specifies if the payment is considered as overdue.

net_payment_term
integer

The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.

file_url
string

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

customer
object

The customer on which the invoice applies. It refers to the customer account or entity associated with the invoice.

metadata
object[]
applied_taxes
object[]
applied_usage_thresholds
object[] | null
credits
object[]
fees
object[]
subscriptions
object[]
error_details
object[]