Skip to main content

Plan object

This object represents a plan.

Schema

{
"plan": {
"lago_id": "b7ab2926-1de8-4428-9bcd-779314ac129b",
"name": "test1",
"created_at": "2022-07-01T14:47:14Z",
"code": "plan_code",
"interval": "weekly",
"description": "hello_this_is_desc",
"amount_cents": 900,
"amount_currency": "EUR",
"trial_period": 3.0,
"pay_in_advance": true,
"bill_charges_monthly": null,
"charges": [
{
"lago_id": "51c1e851-5be6-4343-a0ee-39a81d8b4ee1",
"lago_billable_metric_id": "a6947936-628f-4945-8857-db6858ee7941",
"created_at": "2022-07-01T14:47:14Z",
"amount_currency": "EUR",
"charge_model": "standard",
"properties": {
"amount": "0.22"
}
}
]
}
}

Plan attributes

AttributesDescription
lago_id     String     Not nullUnique identifier of the plan in Lago application.
name     String     Not nullPlan name.
created_at     String     Not null    
ISO 8601 datetime in UTC
Date of plan creation.
code     String     Not nullCode identifying the plan.
interval     String     Not null
Interval that applies on subscription and specifies billing period.
Possible values
- yearly
- weekly
- monthly
description     StringPlan description.
amount_cents     Integer     Not nullAmount in cents.
amount_currency     String     Not nullCurrency of the amount.
trial_period     FloatNumber of days for free trial.
pay_in_advance     BooleanValue should be true for payment in advance and false for payment in arrear.
bill_charges_monthly     BooleanIt should be set to true if monthly billing is needed on yearly plan.

Charge attributes

AttributesDescription
lago_id     String     Not nullUnique identifier of the charge in Lago application.
lago_billable_metric_id     String     Not nullUnique identifier of the related billable metric in Lago application.
created_at     String     Not null    
ISO 8601 datetime in UTC
Date of charge creation.
charge_model     String     Not null
Charge model used in event calculations.
Possible values
- standard
- graduated
- package
- percentage
amount_currency     String     Not nullCurrency of the charge.
properties     JSONExtra data. This field will depend on selected charge_model