API Reference
- Getting started
- Add-ons
- Analytics
- Billable metrics
- Coupons
- Credit notes
- Customer usage
- Customers
- Events
- Fees
- Invoices
- Organizations
- Payment requests
- Plans
- Resources
- Subscriptions
- Taxes
- Wallets
- Webhook endpoints
- Webhooks
Update an invoice
This endpoint is used for updating an existing invoice.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
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.
The payment status of the invoice. Possible values are pending
, failed
or succeeded
.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
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.
Body
The payment status of the invoice. Possible values are pending
, failed
or succeeded
.
pending
, succeeded
, failed
Response
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.
Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
The unique identifier assigned to the customer within the organization's scope. This identifier is used to track and reference the customer's order of creation within the organization's system. It ensures that each customer has a distinct `sequential_id`` associated with them, allowing for easy identification and sorting based on the order of creation
A concise and unique identifier for the customer, formed by combining the Organization's name
, id
, and customer's sequential_id
The customer external unique identifier (provided by your own application)
The customer's applicable timezone, used for billing purposes in their local time.
UTC
, Africa/Algiers
, Africa/Cairo
, Africa/Casablanca
, Africa/Harare
, Africa/Johannesburg
, Africa/Monrovia
, Africa/Nairobi
, America/Argentina/Buenos_Aires
, America/Bogota
, America/Caracas
, America/Chicago
, America/Chihuahua
, America/Denver
, America/Godthab
, America/Guatemala
, America/Guyana
, America/Halifax
, America/Indiana/Indianapolis
, America/Juneau
, America/La_Paz
, America/Lima
, America/Los_Angeles
, America/Mazatlan
, America/Mexico_City
, America/Monterrey
, America/Montevideo
, America/New_York
, America/Phoenix
, America/Puerto_Rico
, America/Regina
, America/Santiago
, America/Sao_Paulo
, America/St_Johns
, America/Tijuana
, Asia/Almaty
, Asia/Baghdad
, Asia/Baku
, Asia/Bangkok
, Asia/Chongqing
, Asia/Colombo
, Asia/Dhaka
, Asia/Hong_Kong
, Asia/Irkutsk
, Asia/Jakarta
, Asia/Jerusalem
, Asia/Kabul
, Asia/Kamchatka
, Asia/Karachi
, Asia/Kathmandu
, Asia/Kolkata
, Asia/Krasnoyarsk
, Asia/Kuala_Lumpur
, Asia/Kuwait
, Asia/Magadan
, Asia/Muscat
, Asia/Novosibirsk
, Asia/Rangoon
, Asia/Riyadh
, Asia/Seoul
, Asia/Shanghai
, Asia/Singapore
, Asia/Srednekolymsk
, Asia/Taipei
, Asia/Tashkent
, Asia/Tbilisi
, Asia/Tehran
, Asia/Tokyo
, Asia/Ulaanbaatar
, Asia/Urumqi
, Asia/Vladivostok
, Asia/Yakutsk
, Asia/Yekaterinburg
, Asia/Yerevan
, Atlantic/Azores
, Atlantic/Cape_Verde
, Atlantic/South_Georgia
, Australia/Adelaide
, Australia/Brisbane
, Australia/Darwin
, Australia/Hobart
, Australia/Melbourne
, Australia/Perth
, Australia/Sydney
, Europe/Amsterdam
, Europe/Athens
, Europe/Belgrade
, Europe/Berlin
, Europe/Bratislava
, Europe/Brussels
, Europe/Bucharest
, Europe/Budapest
, Europe/Copenhagen
, Europe/Dublin
, Europe/Helsinki
, Europe/Istanbul
, Europe/Kaliningrad
, Europe/Kiev
, Europe/Lisbon
, Europe/Ljubljana
, Europe/London
, Europe/Madrid
, Europe/Minsk
, Europe/Moscow
, Europe/Paris
, Europe/Prague
, Europe/Riga
, Europe/Rome
, Europe/Samara
, Europe/Sarajevo
, Europe/Skopje
, Europe/Sofia
, Europe/Stockholm
, Europe/Tallinn
, Europe/Vienna
, Europe/Vilnius
, Europe/Volgograd
, Europe/Warsaw
, Europe/Zagreb
, Europe/Zurich
, GMT+12
, Pacific/Apia
, Pacific/Auckland
, Pacific/Chatham
, Pacific/Fakaofo
, Pacific/Fiji
, Pacific/Guadalcanal
, Pacific/Guam
, Pacific/Honolulu
, Pacific/Majuro
, Pacific/Midway
, Pacific/Noumea
, Pacific/Pago_Pago
, Pacific/Port_Moresby
, Pacific/Tongatapu
The date of the customer 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 customer object was created
The first line of the billing address
The second line of the billing address
The city of the customer's billing address
Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
AD
, AE
, AF
, AG
, AI
, AL
, AM
, AO
, AQ
, AR
, AS
, AT
, AU
, AW
, AX
, AZ
, BA
, BB
, BD
, BE
, BF
, BG
, BH
, BI
, BJ
, BL
, BM
, BN
, BO
, BQ
, BR
, BS
, BT
, BV
, BW
, BY
, BZ
, CA
, CC
, CD
, CF
, CG
, CH
, CI
, CK
, CL
, CM
, CN
, CO
, CR
, CU
, CV
, CW
, CX
, CY
, CZ
, DE
, DJ
, DK
, DM
, DO
, DZ
, EC
, EE
, EG
, EH
, ER
, ES
, ET
, FI
, FJ
, FK
, FM
, FO
, FR
, GA
, GB
, GD
, GE
, GF
, GG
, GH
, GI
, GL
, GM
, GN
, GP
, GQ
, GR
, GS
, GT
, GU
, GW
, GY
, HK
, HM
, HN
, HR
, HT
, HU
, ID
, IE
, IL
, IM
, IN
, IO
, IQ
, IR
, IS
, IT
, JE
, JM
, JO
, JP
, KE
, KG
, KH
, KI
, KM
, KN
, KP
, KR
, KW
, KY
, KZ
, LA
, LB
, LC
, LI
, LK
, LR
, LS
, LT
, LU
, LV
, LY
, MA
, MC
, MD
, ME
, MF
, MG
, MH
, MK
, ML
, MM
, MN
, MO
, MP
, MQ
, MR
, MS
, MT
, MU
, MV
, MW
, MX
, MY
, MZ
, NA
, NC
, NE
, NF
, NG
, NI
, NL
, NO
, NP
, NR
, NU
, NZ
, OM
, PA
, PE
, PF
, PG
, PH
, PK
, PL
, PM
, PN
, PR
, PS
, PT
, PW
, PY
, QA
, RE
, RO
, RS
, RU
, RW
, SA
, SB
, SC
, SD
, SE
, SG
, SH
, SI
, SJ
, SK
, SL
, SM
, SN
, SO
, SR
, SS
, ST
, SV
, SX
, SY
, SZ
, TC
, TD
, TF
, TG
, TH
, TJ
, TK
, TL
, TM
, TN
, TO
, TR
, TT
, TV
, TW
, TZ
, UA
, UG
, UM
, US
, UY
, UZ
, VA
, VC
, VE
, VG
, VI
, VN
, VU
, WF
, WS
, YE
, YT
, ZA
, ZM
, ZW
Currency of the customer. Format must be ISO 4217
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 email of the customer
The legal company name of the customer
The legal company number of the customer
The logo URL of the customer
The full name of the customer
First name of the customer
Last name of the customer
The type of the customer. It can have one of the following values:
company
: the customer is a company.individual
: the customer is an individual.
company
, individual
The phone number of the customer
The state of the customer's billing address
The tax identification number of the customer
The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone
UTC
, Africa/Algiers
, Africa/Cairo
, Africa/Casablanca
, Africa/Harare
, Africa/Johannesburg
, Africa/Monrovia
, Africa/Nairobi
, America/Argentina/Buenos_Aires
, America/Bogota
, America/Caracas
, America/Chicago
, America/Chihuahua
, America/Denver
, America/Godthab
, America/Guatemala
, America/Guyana
, America/Halifax
, America/Indiana/Indianapolis
, America/Juneau
, America/La_Paz
, America/Lima
, America/Los_Angeles
, America/Mazatlan
, America/Mexico_City
, America/Monterrey
, America/Montevideo
, America/New_York
, America/Phoenix
, America/Puerto_Rico
, America/Regina
, America/Santiago
, America/Sao_Paulo
, America/St_Johns
, America/Tijuana
, Asia/Almaty
, Asia/Baghdad
, Asia/Baku
, Asia/Bangkok
, Asia/Chongqing
, Asia/Colombo
, Asia/Dhaka
, Asia/Hong_Kong
, Asia/Irkutsk
, Asia/Jakarta
, Asia/Jerusalem
, Asia/Kabul
, Asia/Kamchatka
, Asia/Karachi
, Asia/Kathmandu
, Asia/Kolkata
, Asia/Krasnoyarsk
, Asia/Kuala_Lumpur
, Asia/Kuwait
, Asia/Magadan
, Asia/Muscat
, Asia/Novosibirsk
, Asia/Rangoon
, Asia/Riyadh
, Asia/Seoul
, Asia/Shanghai
, Asia/Singapore
, Asia/Srednekolymsk
, Asia/Taipei
, Asia/Tashkent
, Asia/Tbilisi
, Asia/Tehran
, Asia/Tokyo
, Asia/Ulaanbaatar
, Asia/Urumqi
, Asia/Vladivostok
, Asia/Yakutsk
, Asia/Yekaterinburg
, Asia/Yerevan
, Atlantic/Azores
, Atlantic/Cape_Verde
, Atlantic/South_Georgia
, Australia/Adelaide
, Australia/Brisbane
, Australia/Darwin
, Australia/Hobart
, Australia/Melbourne
, Australia/Perth
, Australia/Sydney
, Europe/Amsterdam
, Europe/Athens
, Europe/Belgrade
, Europe/Berlin
, Europe/Bratislava
, Europe/Brussels
, Europe/Bucharest
, Europe/Budapest
, Europe/Copenhagen
, Europe/Dublin
, Europe/Helsinki
, Europe/Istanbul
, Europe/Kaliningrad
, Europe/Kiev
, Europe/Lisbon
, Europe/Ljubljana
, Europe/London
, Europe/Madrid
, Europe/Minsk
, Europe/Moscow
, Europe/Paris
, Europe/Prague
, Europe/Riga
, Europe/Rome
, Europe/Samara
, Europe/Sarajevo
, Europe/Skopje
, Europe/Sofia
, Europe/Stockholm
, Europe/Tallinn
, Europe/Vienna
, Europe/Vilnius
, Europe/Volgograd
, Europe/Warsaw
, Europe/Zagreb
, Europe/Zurich
, GMT+12
, Pacific/Apia
, Pacific/Auckland
, Pacific/Chatham
, Pacific/Fakaofo
, Pacific/Fiji
, Pacific/Guadalcanal
, Pacific/Guam
, Pacific/Honolulu
, Pacific/Majuro
, Pacific/Midway
, Pacific/Noumea
, Pacific/Pago_Pago
, Pacific/Port_Moresby
, Pacific/Tongatapu
The custom website URL of the customer
The zipcode of the customer's billing address
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 date of the customer 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 customer object was updated
Specifies how invoices with a zero total amount should be handled:
inherit
: (Default) Follows the organization-level configuration.finalize
: Invoices are issued and finalized even if the total amount is zero.skip
: Invoices with a total amount of zero are not finalized.
inherit
, skip
, finalize
Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer.
The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items
The payment provider utilized to initiate payments for invoices issued by Lago.
Accepted values: stripe
, adyen
, gocardless
or null. This field is required if you intend to assign a provider_customer_id
.
stripe
, adyen
, gocardless
Unique code used to identify a payment provider connection.
The customer ID within the payment provider's system. If this field is not provided, Lago has the option to create a new customer record within the payment provider's system on behalf of the customer
Set this field to true
if you want to create the customer in the payment provider synchronously with the customer creation process in Lago. This option is applicable only when the provider_customer_id
is null
and the customer is automatically created in the payment provider through Lago. By default, the value is set to false
Set this field to true
if you want to create a customer record in the payment provider's system. This option is applicable only when the provider_customer_id
is null and the sync_with_provider
field is set to true
. By default, the value is set to false
The document locale, specified in the ISO 639-1 format. This field represents the language or locale used for the documents issued by Lago
Specifies the available payment methods that can be used for this customer when payment_provider
is set to stripe
. The provider_payment_methods
field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to card
. For now, possible values are card
, sepa_debit
, us_bank_account
, bacs_debit
and link
. Note that when link
is selected, card
should also be provided in the array.
Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer.
The first line of the billing address
The second line of the billing address
The city of the customer's billing address
Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
AD
, AE
, AF
, AG
, AI
, AL
, AM
, AO
, AQ
, AR
, AS
, AT
, AU
, AW
, AX
, AZ
, BA
, BB
, BD
, BE
, BF
, BG
, BH
, BI
, BJ
, BL
, BM
, BN
, BO
, BQ
, BR
, BS
, BT
, BV
, BW
, BY
, BZ
, CA
, CC
, CD
, CF
, CG
, CH
, CI
, CK
, CL
, CM
, CN
, CO
, CR
, CU
, CV
, CW
, CX
, CY
, CZ
, DE
, DJ
, DK
, DM
, DO
, DZ
, EC
, EE
, EG
, EH
, ER
, ES
, ET
, FI
, FJ
, FK
, FM
, FO
, FR
, GA
, GB
, GD
, GE
, GF
, GG
, GH
, GI
, GL
, GM
, GN
, GP
, GQ
, GR
, GS
, GT
, GU
, GW
, GY
, HK
, HM
, HN
, HR
, HT
, HU
, ID
, IE
, IL
, IM
, IN
, IO
, IQ
, IR
, IS
, IT
, JE
, JM
, JO
, JP
, KE
, KG
, KH
, KI
, KM
, KN
, KP
, KR
, KW
, KY
, KZ
, LA
, LB
, LC
, LI
, LK
, LR
, LS
, LT
, LU
, LV
, LY
, MA
, MC
, MD
, ME
, MF
, MG
, MH
, MK
, ML
, MM
, MN
, MO
, MP
, MQ
, MR
, MS
, MT
, MU
, MV
, MW
, MX
, MY
, MZ
, NA
, NC
, NE
, NF
, NG
, NI
, NL
, NO
, NP
, NR
, NU
, NZ
, OM
, PA
, PE
, PF
, PG
, PH
, PK
, PL
, PM
, PN
, PR
, PS
, PT
, PW
, PY
, QA
, RE
, RO
, RS
, RU
, RW
, SA
, SB
, SC
, SD
, SE
, SG
, SH
, SI
, SJ
, SK
, SL
, SM
, SN
, SO
, SR
, SS
, ST
, SV
, SX
, SY
, SZ
, TC
, TD
, TF
, TG
, TH
, TJ
, TK
, TL
, TM
, TN
, TO
, TR
, TT
, TV
, TW
, TZ
, UA
, UG
, UM
, US
, UY
, UZ
, VA
, VC
, VE
, VG
, VI
, VN
, VU
, WF
, WS
, YE
, YT
, ZA
, ZM
, ZW
The state of the customer's billing address
The zipcode of the customer's billing address
A unique identifier for the customer metadata object in the Lago application. Can be used to update a key-value pair
The metadata object key
The metadata object value
Determines whether the item or information should be displayed in the invoice. If set to true, the item or information will be included and visible in the generated invoice. If set to false, the item or information will be excluded and not displayed in the invoice.
The date of the metadata object 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 metadata object was created
A unique identifier for the integration customer object in the Lago application.
The integration type used for accounting and tax syncs.
Accepted values: netsuite, anrok
.
netsuite
, anrok
Unique code used to identify an integration connection.
The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer.
Set this field to true
if you want to create a customer record in the integration's system. This option is applicable only when the external_customer_id
is null and the sync_with_provider
field is set to true
. By default, the value is set to false
This optional field is needed only when working with netsuite
connection.
Unique identifier assigned to the invoice metadata within the Lago application.
Represents the key of the metadata's key-value pair.
Represents the value of the metadata's key-value pair.
The date and time when the metadata object was created. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
Unique identifier of the applied tax, created by Lago.
Unique identifier of the tax, created by Lago.
Name of the tax.
Unique code used to identify the tax associated with the API request.
The percentage rate of the tax
Internal description of the taxe
Amount of the tax
Currency of the tax
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 date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
Unique identifier of the invoice, created by Lago.
Fees total amount on which the tax is applied
The amount of usage in cents that has been accumulated over the lifetime of the subscription.
The date and time when the lifetime usage was computed. It is expressed in UTC format according to the ISO 8601 datetime standard.
Unique identifier of the usage threshold created by Lago.
The amount to reach to trigger a progressive_billing
invoice.
This field when set to true
indicates that a progressive_billing
invoice will be created every time the lifetime usage increases by the specified amount.
The date and time when the usage threshold was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
The date and time when the usage threshold was last updated. It is expressed in UTC format according to the ISO 8601 datetime standard.
The display name of the usage threshold.
Unique identifier assigned to the credit within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit's item record within the Lago system.
The amount of credit associated with the invoice, expressed in cents.
The currency of the credit.
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
Indicates whether the credit is applied on the amount before taxes (coupons) or after taxes (credit notes). This flag helps determine the order in which credits are applied to the invoice calculation
The item attached to the credit.
Unique identifier assigned to the credit item within the Lago application.
The type of credit applied. Possible values are coupon
, credit_note
or invoice
(for progressive_billing
invoice).
coupon
, credit_note
, invoice
The code of the credit applied. It can be the code of the coupon attached to the credit, the credit note's number or the progressive_billing
invoice number.
The name of the credit applied. It can be the name of the coupon attached to the credit, the initial invoice's number linked to the credit note or the progressive_billing
invoice number.
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 charge that the fee belongs to
Unique identifier assigned to the charge filter 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, 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.
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 cost of this specific fee, excluding any applicable taxes, with precision.
The cost of this specific fee, including any applicable taxes, with precision.
The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed.
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 cost of the tax associated with this specific fee.
The cost of the tax associated with this specific fee, with precision.
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.
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 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
.
pending
, succeeded
, failed
, 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.
Graduated ranges, used for a graduated
charge model.
Total units received in Lago.
Lower value of a tier. It is either 0 or the previous range's to_value + 1
.
Highest value of a tier.
- This value is higher than the from_value of the same tier.
- This value is null for the last tier.
Flat unit amount within a specified tier.
Amount per unit within a specified tier.
Total amount of received units to be charged within a specified tier.
Total amount to be charged for a specific tier, taking into account the flat_unit_amount and the per_unit_total_amount.
Graduated percentage ranges, used for a graduated_percentage
charge model.
Total units received in Lago.
Lower value of a tier. It is either 0 or the previous range's to_value + 1
.
Highest value of a tier.
- This value is higher than the from_value of the same tier.
- This value is null for the last tier.
Flat unit amount within a specified tier.
Percentage rate applied within a specified tier.
Total amount of received units to be charged within a specified tier.
Total amount to be charged for a specific tier, taking into account the flat_unit_amount and the per_unit_total_amount.
The quantity of units that are provided free of charge for each billing period in a package
charge model.
The quantity of units that are not provided free of charge for each billing period in a package
charge model.
The quantity of units included, defined for Package or Percentage charge model.
Total amount to charge for received paid_units, defined for Package or Percentage charge model.
The total units received in Lago for the Percentage charge model.
Total number of free events allowed for the Percentage charge model.
Percentage rate applied for the Percentage charge model.
Total amount of received units to be charged for the Percentage charge model.
Total number of paid events for the Percentage charge model.
Fixed fee unit price per received paid_event for the Percentage charge model.
Total amount to charge for received paid_events for the Percentage charge model.
Total adjustment amount linked to minimum and maximum spending per transaction for the Percentage charge model.
Volume ranges, used for a volume
charge model.
The flat amount for a whole tier, excluding tax, for a volume
charge model.
The unit price, excluding tax, for a specific tier of a volume
charge model.
Total amount of received units to be charged.
Item attached to the fee
The fee type. Possible values are add-on
, charge
, credit
or subscription
.
charge
, add_on
, subscription
, credit
The code of the fee item. It can be the code of the add-o
n, the code of the charge
, the code of the credit
or the code of the subscription
.
The name of the fee item. It can be the name of the add-on
, the name of the charge
, the name of the credit
or the name of the subscription
.
Unique identifier of the fee item, created by Lago. It can be the identifier of the add-on
, the identifier of the charge
, the identifier of the credit
or the identifier of the subscription
.
The type of the fee item. Possible values are AddOn
, BillableMetric
, WalletTransaction
or Subscription
.
AddOn
, BillableMetric
, Subscription
, WalletTransaction
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.
Specifies the name that will be displayed on an invoice. If no value is set for this field, the actual charge filter values will be used as the default display name.
Key value list of event properties
List of fee applied taxes
Unique identifier of the applied tax, created by Lago.
Unique identifier of the tax, created by Lago.
Name of the tax.
Unique code used to identify the tax associated with the API request.
The percentage rate of the tax
Internal description of the taxe
Amount of the tax
Currency of the tax
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 date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
Unique identifier of the fee, created by Lago.
Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
The subscription external unique identifier (provided by your own application).
Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
The customer external unique identifier (provided by your own application).
The billing time for the subscription, which can be set as either anniversary
or calendar
. If not explicitly provided, it will default to calendar
. The billing time determines the timing of recurring billing cycles for the subscription. By specifying anniversary
, the billing cycle will be based on the specific date the subscription started (billed fully), while calendar
sets the billing cycle at the first day of the week/month/year (billed with proration).
calendar
, anniversary
The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.
The unique code representing the plan to be attached to the customer. This code must correspond to the code
property of one of the active plans.
The status of the subscription, which can have the following values:
pending
: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period.active
: the subscription is currently active and applied to the customer.terminated
: the subscription is no longer active.canceled
: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer or when a subscription with a pending status is terminated.
active
, pending
, terminated
, canceled
The creation date of the subscription, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). This date provides a timestamp indicating when the subscription was initially created.
The cancellation date of the subscription. This field is not null when the subscription is canceled
. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
The effective start date of the subscription. This field can be null if the subscription is pending
or canceled
. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with anniversary
billing time. The anniversary_date
should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
The termination date of the subscription. This field is not null when the subscription is terminated
. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC)
The code identifying the previous plan associated with this subscription.
The code identifying the next plan in the case of a downgrade.
The date when the plan will be downgraded, represented in ISO 8601 date format.
The date when the free trial is ended, represented in ISO 8601 date format.
The date and time when the current billing period started, represented in ISO 8601 date format.
The date and time when the current billing period ends, represented in ISO 8601 date format.
Unique identifier assigned to the error_detail within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the error's record within the Lago system.
Code that specifies part of the application / connection, where the error originally happened
Key value list of more elaborated error detail, where by the key of error_code an external service error details are stored
Was this page helpful?