Get Plan
Token-based authentication with required prefix "Token"
Filter to versions that have the currency specified by this currency code.
Filter to versions that have this custom type. If you choose custom_only, you will only see versions that have target customers. If you choose public_only, you will only see versions that do not have target customers.
custom_only
- Custom Onlypublic_only
- Public Onlyall
- All
Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null.
curl --request GET \
--url https://api.uselotus.io/api/plans/{plan_id}/ \
--header 'Authorization: <api-key>'
{
"plan_id": "<string>",
"plan_name": "<string>",
"plan_duration": "monthly",
"plan_description": "<string>",
"external_links": [
{
"source": "stripe",
"external_plan_id": "<string>"
}
],
"num_versions": 123,
"active_version": 123,
"active_subscriptions": 123,
"tags": [
"<string>"
],
"versions": [
{
"recurring_charges": [
{
"name": "<string>",
"charge_timing": "in_advance",
"charge_behavior": "prorate",
"amount": 5000000000,
"pricing_unit": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"invoicing_interval_unit": "day",
"invoicing_interval_count": 16383,
"reset_interval_unit": "day",
"reset_interval_count": 16383
}
],
"components": [
{
"billable_metric": {
"metric_id": "<string>",
"event_name": "<string>",
"property_name": "<string>",
"aggregation_type": "<string>",
"granularity": "seconds",
"event_type": "delta",
"metric_type": "counter",
"metric_name": "<string>",
"numeric_filters": [
{
"property_name": "<string>",
"operator": "gte",
"comparison_value": 123
}
],
"categorical_filters": [
{
"property_name": "<string>",
"operator": "isin",
"comparison_value": [
"<string>"
]
}
],
"is_cost_metric": true,
"custom_sql": "<string>",
"proration": "seconds"
},
"tiers": [
{
"type": "flat",
"range_start": 5000000000,
"range_end": 5000000000,
"cost_per_batch": 5000000000,
"metric_units_per_batch": 5000000000,
"batch_rounding_type": "<any>"
}
],
"pricing_unit": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"invoicing_interval_unit": "day",
"invoicing_interval_count": 123,
"reset_interval_unit": "day",
"reset_interval_count": 123,
"prepaid_charge": {
"units": 5000000000,
"charge_behavior": "prorate"
}
}
],
"features": [
{
"feature_id": "<string>",
"feature_name": "<string>",
"feature_description": "<string>"
}
],
"price_adjustment": {
"price_adjustment_name": "<string>",
"price_adjustment_description": "<string>",
"price_adjustment_type": "percentage",
"price_adjustment_amount": 0
},
"version": 123,
"status": "active",
"plan_name": "<string>",
"currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"active_from": "2023-11-07T05:31:56Z",
"active_to": "2023-11-07T05:31:56Z",
"localized_name": "<string>",
"target_customers": [
{
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>"
}
],
"created_on": "2023-11-07T05:31:56Z",
"usage_billing_frequency": "<string>",
"flat_fee_billing_type": "in_advance",
"flat_rate": 5000000000,
"description": "<string>"
}
],
"parent_plan": {
"plan_name": "<string>",
"plan_id": "<string>"
},
"target_customer": {
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>"
},
"display_version": {
"recurring_charges": [
{
"name": "<string>",
"charge_timing": "in_advance",
"charge_behavior": "prorate",
"amount": 5000000000,
"pricing_unit": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"invoicing_interval_unit": "day",
"invoicing_interval_count": 16383,
"reset_interval_unit": "day",
"reset_interval_count": 16383
}
],
"components": [
{
"billable_metric": {
"metric_id": "<string>",
"event_name": "<string>",
"property_name": "<string>",
"aggregation_type": "<string>",
"granularity": "seconds",
"event_type": "delta",
"metric_type": "counter",
"metric_name": "<string>",
"numeric_filters": [
{
"property_name": "<string>",
"operator": "gte",
"comparison_value": 123
}
],
"categorical_filters": [
{
"property_name": "<string>",
"operator": "isin",
"comparison_value": [
"<string>"
]
}
],
"is_cost_metric": true,
"custom_sql": "<string>",
"proration": "seconds"
},
"tiers": [
{
"type": "flat",
"range_start": 5000000000,
"range_end": 5000000000,
"cost_per_batch": 5000000000,
"metric_units_per_batch": 5000000000,
"batch_rounding_type": "<any>"
}
],
"pricing_unit": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"invoicing_interval_unit": "day",
"invoicing_interval_count": 123,
"reset_interval_unit": "day",
"reset_interval_count": 123,
"prepaid_charge": {
"units": 5000000000,
"charge_behavior": "prorate"
}
}
],
"features": [
{
"feature_id": "<string>",
"feature_name": "<string>",
"feature_description": "<string>"
}
],
"price_adjustment": {
"price_adjustment_name": "<string>",
"price_adjustment_description": "<string>",
"price_adjustment_type": "percentage",
"price_adjustment_amount": 0
},
"version": 123,
"status": "active",
"plan_name": "<string>",
"currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"active_from": "2023-11-07T05:31:56Z",
"active_to": "2023-11-07T05:31:56Z",
"localized_name": "<string>",
"target_customers": [
{
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>"
}
],
"created_on": "2023-11-07T05:31:56Z",
"usage_billing_frequency": "<string>",
"flat_fee_billing_type": "in_advance",
"flat_rate": 5000000000,
"description": "<string>"
},
"status": "<string>"
}
Retrieves a plan object.
lotus.get_plan(
plan_id='plan_0569173ee6654369',
)
Authorizations
Token-based authentication with required prefix "Token"
Path Parameters
Query Parameters
Filter to versions that have the currency specified by this currency code.
Filter to versions that have this custom type. If you choose custom_only, you will only see versions that have target customers. If you choose public_only, you will only see versions that do not have target customers.
custom_only
- Custom Onlypublic_only
- Public Onlyall
- All
custom_only
, public_only
, all
Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null.
active
, ended
, not_started
Response
Name of the plan
Duration of the plan
monthly
- Monthlyquarterly
- Quarterlyyearly
- Yearly
monthly
, quarterly
, yearly
,
Description of the plan
The external links that this plan has.
stripe
- Stripebraintree
- Braintree
stripe
, braintree
The number of versions that this plan has.
This plan's currently active version.
The number of active subscriptions that this plan has across all versions.
The tags that this plan has.
This plan's versions.
in_advance
- in_advancein_arrears
- in_arrears
in_advance
, in_arrears
prorate
- proratefull
- full
prorate
, full
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
,
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
,
Name of the event that this metric is tracking.
The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count.
The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'.
seconds
- Secondminutes
- Minutehours
- Hourdays
- Daymonths
- Monthquarters
- Quarteryears
- Yeartotal
- Total
seconds
, minutes
, hours
, days
, months
, quarters
, years
, total
,
Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types.
delta
- Deltatotal
- Total
delta
, total
,
The type of metric that this is. Please refer to our documentation for an explanation of the different types.
counter
- Counterrate
- Ratecustom
- Customgauge
- Gauge
counter
, rate
, custom
, gauge
gte
- Greater than or equal togt
- Greater thaneq
- Equal tolt
- Less thanlte
- Less than or equal to
gte
, gt
, eq
, lt
, lte
isin
- Is inisnotin
- Is not in
isin
, isnotin
Whether or not this metric is a cost metric (used to track costs to your business).
A custom SQL query that can be used to define the metric. Please refer to our documentation for more information.
The proration of the metric. Only applies to metrics of type 'gauge'.
seconds
- Secondminutes
- Minutehours
- Hourdays
- Daymonths
- Monthquarters
- Quarteryears
- Yeartotal
- Total
seconds
, minutes
, hours
, days
, months
, quarters
, years
, total
,
flat
- flatper_unit
- per_unitfree
- free
flat
, per_unit
, free
round_up
- round_upround_down
- round_downround_nearest
- round_nearestno_rounding
- no_rounding
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
,
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
,
The number of units to charge for. If left null, then it will be required at subscription create time.
prorate
- proratefull
- full
prorate
, full
percentage
- Percentagefixed
- Fixedprice_override
- Price Override
percentage
, fixed
, price_override
active
- Activeretiring
- Retiringgrandfathered
- Grandfathereddeleted
- Deletedinactive
- Inactivenot_started
- Not Started
active
, retiring
, grandfathered
, deleted
, inactive
, not_started
The display name of the customer
The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider
The id provided when creating the customer, we suggest matching with your internal customer id in your backend
in_advance
- in_advancein_arrears
- in_arrears
in_advance
, in_arrears
[DEPRECATED] The parent plan that this plan has.
Name of the plan
[DEPRECATED] The target customer that this plan has.
The display name of the customer
The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider
The id provided when creating the customer, we suggest matching with your internal customer id in your backend
[DEPRECATED] Display version has been deprecated. Use 'versions' instead. We will still return this field for now with some heuristics for figuring out what the desired version is, but it will be removed in the near future.
in_advance
- in_advancein_arrears
- in_arrears
in_advance
, in_arrears
prorate
- proratefull
- full
prorate
, full
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
,
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
,
Name of the event that this metric is tracking.
The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count.
The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'.
seconds
- Secondminutes
- Minutehours
- Hourdays
- Daymonths
- Monthquarters
- Quarteryears
- Yeartotal
- Total
seconds
, minutes
, hours
, days
, months
, quarters
, years
, total
,
Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types.
delta
- Deltatotal
- Total
delta
, total
,
The type of metric that this is. Please refer to our documentation for an explanation of the different types.
counter
- Counterrate
- Ratecustom
- Customgauge
- Gauge
counter
, rate
, custom
, gauge
gte
- Greater than or equal togt
- Greater thaneq
- Equal tolt
- Less thanlte
- Less than or equal to
gte
, gt
, eq
, lt
, lte
isin
- Is inisnotin
- Is not in
isin
, isnotin
Whether or not this metric is a cost metric (used to track costs to your business).
A custom SQL query that can be used to define the metric. Please refer to our documentation for more information.
The proration of the metric. Only applies to metrics of type 'gauge'.
seconds
- Secondminutes
- Minutehours
- Hourdays
- Daymonths
- Monthquarters
- Quarteryears
- Yeartotal
- Total
seconds
, minutes
, hours
, days
, months
, quarters
, years
, total
,
flat
- flatper_unit
- per_unitfree
- free
flat
, per_unit
, free
round_up
- round_upround_down
- round_downround_nearest
- round_nearestno_rounding
- no_rounding
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
,
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
,
The number of units to charge for. If left null, then it will be required at subscription create time.
prorate
- proratefull
- full
prorate
, full
percentage
- Percentagefixed
- Fixedprice_override
- Price Override
percentage
, fixed
, price_override
active
- Activeretiring
- Retiringgrandfathered
- Grandfathereddeleted
- Deletedinactive
- Inactivenot_started
- Not Started
active
, retiring
, grandfathered
, deleted
, inactive
, not_started
The display name of the customer
The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider
The id provided when creating the customer, we suggest matching with your internal customer id in your backend
in_advance
- in_advancein_arrears
- in_arrears
in_advance
, in_arrears
[DEPRECATED] The status of this plan.
curl --request GET \
--url https://api.uselotus.io/api/plans/{plan_id}/ \
--header 'Authorization: <api-key>'
{
"plan_id": "<string>",
"plan_name": "<string>",
"plan_duration": "monthly",
"plan_description": "<string>",
"external_links": [
{
"source": "stripe",
"external_plan_id": "<string>"
}
],
"num_versions": 123,
"active_version": 123,
"active_subscriptions": 123,
"tags": [
"<string>"
],
"versions": [
{
"recurring_charges": [
{
"name": "<string>",
"charge_timing": "in_advance",
"charge_behavior": "prorate",
"amount": 5000000000,
"pricing_unit": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"invoicing_interval_unit": "day",
"invoicing_interval_count": 16383,
"reset_interval_unit": "day",
"reset_interval_count": 16383
}
],
"components": [
{
"billable_metric": {
"metric_id": "<string>",
"event_name": "<string>",
"property_name": "<string>",
"aggregation_type": "<string>",
"granularity": "seconds",
"event_type": "delta",
"metric_type": "counter",
"metric_name": "<string>",
"numeric_filters": [
{
"property_name": "<string>",
"operator": "gte",
"comparison_value": 123
}
],
"categorical_filters": [
{
"property_name": "<string>",
"operator": "isin",
"comparison_value": [
"<string>"
]
}
],
"is_cost_metric": true,
"custom_sql": "<string>",
"proration": "seconds"
},
"tiers": [
{
"type": "flat",
"range_start": 5000000000,
"range_end": 5000000000,
"cost_per_batch": 5000000000,
"metric_units_per_batch": 5000000000,
"batch_rounding_type": "<any>"
}
],
"pricing_unit": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"invoicing_interval_unit": "day",
"invoicing_interval_count": 123,
"reset_interval_unit": "day",
"reset_interval_count": 123,
"prepaid_charge": {
"units": 5000000000,
"charge_behavior": "prorate"
}
}
],
"features": [
{
"feature_id": "<string>",
"feature_name": "<string>",
"feature_description": "<string>"
}
],
"price_adjustment": {
"price_adjustment_name": "<string>",
"price_adjustment_description": "<string>",
"price_adjustment_type": "percentage",
"price_adjustment_amount": 0
},
"version": 123,
"status": "active",
"plan_name": "<string>",
"currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"active_from": "2023-11-07T05:31:56Z",
"active_to": "2023-11-07T05:31:56Z",
"localized_name": "<string>",
"target_customers": [
{
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>"
}
],
"created_on": "2023-11-07T05:31:56Z",
"usage_billing_frequency": "<string>",
"flat_fee_billing_type": "in_advance",
"flat_rate": 5000000000,
"description": "<string>"
}
],
"parent_plan": {
"plan_name": "<string>",
"plan_id": "<string>"
},
"target_customer": {
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>"
},
"display_version": {
"recurring_charges": [
{
"name": "<string>",
"charge_timing": "in_advance",
"charge_behavior": "prorate",
"amount": 5000000000,
"pricing_unit": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"invoicing_interval_unit": "day",
"invoicing_interval_count": 16383,
"reset_interval_unit": "day",
"reset_interval_count": 16383
}
],
"components": [
{
"billable_metric": {
"metric_id": "<string>",
"event_name": "<string>",
"property_name": "<string>",
"aggregation_type": "<string>",
"granularity": "seconds",
"event_type": "delta",
"metric_type": "counter",
"metric_name": "<string>",
"numeric_filters": [
{
"property_name": "<string>",
"operator": "gte",
"comparison_value": 123
}
],
"categorical_filters": [
{
"property_name": "<string>",
"operator": "isin",
"comparison_value": [
"<string>"
]
}
],
"is_cost_metric": true,
"custom_sql": "<string>",
"proration": "seconds"
},
"tiers": [
{
"type": "flat",
"range_start": 5000000000,
"range_end": 5000000000,
"cost_per_batch": 5000000000,
"metric_units_per_batch": 5000000000,
"batch_rounding_type": "<any>"
}
],
"pricing_unit": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"invoicing_interval_unit": "day",
"invoicing_interval_count": 123,
"reset_interval_unit": "day",
"reset_interval_count": 123,
"prepaid_charge": {
"units": 5000000000,
"charge_behavior": "prorate"
}
}
],
"features": [
{
"feature_id": "<string>",
"feature_name": "<string>",
"feature_description": "<string>"
}
],
"price_adjustment": {
"price_adjustment_name": "<string>",
"price_adjustment_description": "<string>",
"price_adjustment_type": "percentage",
"price_adjustment_amount": 0
},
"version": 123,
"status": "active",
"plan_name": "<string>",
"currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"active_from": "2023-11-07T05:31:56Z",
"active_to": "2023-11-07T05:31:56Z",
"localized_name": "<string>",
"target_customers": [
{
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>"
}
],
"created_on": "2023-11-07T05:31:56Z",
"usage_billing_frequency": "<string>",
"flat_fee_billing_type": "in_advance",
"flat_rate": 5000000000,
"description": "<string>"
},
"status": "<string>"
}