Skip to main content
lago_id
string<uuid>
required

Unique identifier of charge, created by Lago.

Example:

"1a901a90-1a90-1a90-1a90-1a901a901a90"

lago_billable_metric_id
string<uuid>
required

Unique identifier of the billable metric created by Lago.

Example:

"1a901a90-1a90-1a90-1a90-1a901a901a90"

billable_metric_code
string
required

Unique code identifying a billable metric.

Example:

"requests"

created_at
string<date-time>
required

The date and time when the charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard.

Example:

"2022-09-14T16:35:31Z"

charge_model
enum<string>
required

Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:

Available options:
dynamic,
graduated,
graduated_percentage,
package,
percentage,
standard,
volume
pay_in_advance
boolean
required

This field determines the billing timing for this specific usage-based charge. When set to true, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.

Example:

true

invoiceable
boolean
required

This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to false when pay_in_advance is true.

Example:

true

regroup_paid_fees
enum<string> | null
required

This setting can only be configured if pay_in_advance is true and invoiceable is false. This field determines whether and when the charge fee should be included in the invoice. If null, no invoice will be issued for this charge fee. If invoice, an invoice will be generated at the end of the period, consolidating all charge fees with a succeeded payment status.

Available options:
null,
invoice
Example:

"invoice"

prorated
boolean
required

Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.

  • If set to true, the charge is prorated based on the remaining days in the current billing period.
  • If set to false, the charge is billed in full.
  • If not defined in the request, default value is false.
Example:

false

min_amount_cents
integer
required

The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.

Example:

1200

properties
object
required

List of all thresholds utilized for calculating the charge.

filters
object[]
required

List of filters used to apply differentiated pricing based on additional event properties.

code
string | null

Unique code identifying the charge within the plan.

Example:

"api_requests_charge"

invoice_display_name
string | null

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.

Example:

"Setup"

taxes
object[]

All taxes applied to the charge.

applied_pricing_unit
object

The pricing unit applied to the charge.

accepts_target_wallet
boolean | null

Specifies whether the charge accepts a target wallet for prepaid credits deduction.

Example:

false

lago_parent_id
string<uuid> | null

Unique identifier of the parent charge (if this is an override).

Example:

"1a901a90-1a90-1a90-1a90-1a901a901a90"