Skip to main content

The subscription object

This object represents the assignation of plan to one of the customer of your business.

The subscription will then define how a the related customer will be invoiced based on the fixed and usage-based charges belonging to this related plan.

Schema

{
"subscription": {
"lago_id": "b7ab2926-1de8-4428-9bcd-779314ac129b",
"lago_customer_id": "99a6094e-199b-4101-896a-54e927ce7bd7",
"customer_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
"canceled_at": "2022-04-29T08:59:51Z",
"created_at": "2022-04-29T08:59:51Z",
"plan_code": "new_code",
"started_at": "2022-04-29T08:59:51Z",
"status": "active",
"terminated_at": null
}
}
AttributesDescription
lago_id     String     Not nullUnique identifer of the subscription in Lago application
lago_customer_id     String     Not nullUnique identifer of the customer in Lago application
customer_id     String     Not nullUnique identifer of the customer in your application
canceled_at     String
ISO 8601 datetime in UTC
Cancelation date of the subscription. It's not null when the subscription is canceled
created_at     String     Not null
ISO 8601 datetime in UTC
Creation date of the subscription
plan_code     String     Not null
Code identifying the plan.
It matches the code property of one of the plans
started_at     String     Not null
ISO 8601 datetime in UTC
Start date of the subscription. It could be null if the subscription is pending of canceled
status     String     Not null
Status of the subscription.
Possible values
- pending: a previous subscription has been downgraded, the current one is waiting for its automatic activation at the end of the billing period.
- active: the subscription is currently applied to the customer.
- terminated: the subscription is not active anymore
- canceled: the subscription has been stopped before its activation. It could happen when two consecutive downgrade have been applied to a customer or when a subscription with a pending one is terminaded.
terminated_at     String    
ISO 8601 datetime in UTC
Termination date of the subscription. It's not null when the subscription is terminated