{
  "customer_usage": {
    "from_datetime": "2022-07-01T00:00:00Z",
    "to_datetime": "2022-07-31T23:59:59Z",
    "issuing_date": "2022-08-01T23:59:59Z",
    "lago_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "currency": "EUR",
    "amount_cents": 123,
    "taxes_amount_cents": 200,
    "total_amount_cents": 123,
    "charges_usage": [
      {
        "units": "1.0",
        "events_count": 10,
        "amount_cents": 123,
        "amount_currency": "EUR",
        "charge": {
          "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
          "charge_model": "graduated",
          "invoice_display_name": "Setup"
        },
        "billable_metric": {
          "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
          "name": "Storage",
          "code": "storage",
          "aggregation_type": "sum_agg"
        },
        "groups": [
          {
            "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
            "key": null,
            "value": "europe",
            "units": "0.9",
            "events_count": 10,
            "amount_cents": 1000
          }
        ],
        "grouped_usage": [
          {
            "amount_cents": 1000,
            "events_count": 10,
            "units": "0.9",
            "grouped_by": {
              "additionalProp1": "string",
              "additionalProp2": "string",
              "additionalProp3": "string"
            },
            "groups": [
              {
                "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
                "key": null,
                "value": "europe",
                "units": "0.9",
                "events_count": 10,
                "amount_cents": 1000
              }
            ]
          }
        ]
      }
    ]
  }
}

Attributes

customer_usage
object
from_datetime
string
required

The lower bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).

to_datetime
string
required

The upper bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).

issuing_date
string
required

The date of creation of the invoice.

amount_cents
integer
required

The amount in cents, tax excluded.

amount_currency
string
required

The currency of the customer’s current usage amount excluding tax.

total_amount_cents
integer
required

The total amount in cents, tax included.

total_amount_currency
string
required

The currency of the customer’s current usage amount including tax.

vat_amount_cents
integer
required

The tax amount in cents.

vat_amount_currency
string
required

The currency of the customer’s current usage tax.

lago_invoice_id
string

A unique identifier associated with the invoice related to this particular usage record. In cases where no invoice has been generated for this particular usage, the field value will be null.

charges_usage
array
required