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
Retrieve past usage
Fetch historical customer usage data for closed billing periods.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The customer external unique identifier (provided by your own application).
Query Parameters
Page number.
Number of records per page.
The unique identifier of the subscription within your application.
Billable metric code filter to apply to the charge usage
Number of past billing period to returns in the result
Response
The amount in cents, tax excluded.
Array of charges that comprise the current usage. It contains detailed information about individual charge items associated with the usage.
The amount in cents, tax excluded, consumed by the customer for a specific charge item.
The currency of a usage item consumed by the customer.
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 related billable metric object.
The aggregation type of the billable metric used for this charge. Possible values are count_agg
, sum_agg
, max_agg
or unique_count_agg
.
count_agg
, sum_agg
, max_agg
, unique_count_agg
, weighted_sum_agg
, latest_agg
The code of the billable metric used for this charge.
Unique identifier assigned to the billable metric within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the billable metric's record within the Lago system.
The name of the billable metric used for this charge.
Object listing all the properties for a specific charge item.
The pricing model applied to this charge. Possible values are standard, graduated
, percentage
, package
or volume
.
standard
, graduated
, package
, percentage
, volume
Unique identifier assigned to the charge within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the charge's record within the Lago system.
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 quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
The number of units consumed by the customer for a specific charge item.
Array of filter object, representing multiple dimensions for a charge item.
The amount in cents, tax excluded, consumed for a specific charge filter related to a charge item.
The quantity of usage events that have been recorded for a particular charge filter during the specified time period. These events may also be referred to as the number of transactions in some contexts.
Specifies the name that will be displayed on an invoice.
The number of units consumed for a specific charge filter related to a charge item.
List of filter values applied to the usage.
Array of aggregated fees, grouped by the event properties defined in a standard
charge model.
The amount in cents, tax excluded, consumed for a specific group related to a charge item.
The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
Array of filter object, representing multiple dimensions for a charge item.
Key value list of event properties aggregated by the charge model
The number of units consumed for a specific group related to a charge item.
The lower bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
The date of creation of the invoice.
The tax amount in cents.
The upper bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
The total amount in cents, tax included.
The currency of the customer's current usage.
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
A unique identifier associated with the invoice related to this particular usage record.
Was this page helpful?