List plans
/api/plans/
curl --request GET \
--url https://api.uselotus.io/api/plans/ \
--header 'Authorization: <authorization>' \
--header 'X-API-KEY: <x-api-key>'
Retrieves an array of plan objects.
Out of the parameters below, duration
, exclude_tags
, include_tags
, and include_tags_all
will filter plan objects. version_currency_code
, version_custom_type
, and version_status
will filter versions within those plans. If a plan has no versions that match the filter, it will not be returned.
lotus.list_plans()
Authorizations
Token-based authentication with required prefix "Token"
Query Parameters
Filter to plans that have this duration.
monthly
- Monthlyquarterly
- Quarterlyyearly
- Yearly
Filter to plans that do not have any of the tags in this list.
Filter to plans that have any of the tags in this list.
Filter to plans that have all of the tags in this list.
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.
Response
The number of active subscriptions that this plan has across all versions.
This plan's currently active version.
[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.
isin
- Is inisnotin
- Is not in
isin
, isnotin
A custom SQL query that can be used to define the metric. Please refer to our documentation for more information.
Name of the event that this metric is tracking.
Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types.
delta
- Deltatotal
- Total
delta
, total
, null
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
, null
Whether or not this metric is a cost metric (used to track costs to your business).
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
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 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
, null
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
, null
prorate
- proratefull
- full
prorate
, full
The number of units to charge for. If left null, then it will be required at subscription create time.
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
, null
round_up
- round_upround_down
- round_downround_nearest
- round_nearestno_rounding
- no_rounding
round_up
, round_down
, round_nearest
, no_rounding
, null
flat
- flatper_unit
- per_unitfree
- free
flat
, per_unit
, free
in_advance
- in_advancein_arrears
- in_arrears
in_advance
, in_arrears
percentage
- Percentagefixed
- Fixedprice_override
- Price Override
percentage
, fixed
, price_override
prorate
- proratefull
- full
prorate
, full
in_advance
- in_advancein_arrears
- in_arrears
in_advance
, in_arrears
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
, null
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
, null
active
- Activeretiring
- Retiringgrandfathered
- Grandfathereddeleted
- Deletedinactive
- Inactivenot_started
- Not Started
active
, retiring
, grandfathered
, deleted
, inactive
, not_started
The id provided when creating the customer, we suggest matching with your internal customer id in your backend
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 external links that this plan has.
stripe
- Stripebraintree
- Braintree
stripe
, braintree
The number of versions that this plan has.
[DEPRECATED] The parent plan that this plan has.
Name of the plan
Description of the plan
Duration of the plan
monthly
- Monthlyquarterly
- Quarterlyyearly
- Yearly
monthly
, quarterly
, yearly
, null
Name of the plan
[DEPRECATED] The status of this plan.
The tags that this plan has.
[DEPRECATED] The target customer that this plan has.
The id provided when creating the customer, we suggest matching with your internal customer id in your backend
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
This plan's versions.
isin
- Is inisnotin
- Is not in
isin
, isnotin
A custom SQL query that can be used to define the metric. Please refer to our documentation for more information.
Name of the event that this metric is tracking.
Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types.
delta
- Deltatotal
- Total
delta
, total
, null
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
, null
Whether or not this metric is a cost metric (used to track costs to your business).
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
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 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
, null
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
, null
prorate
- proratefull
- full
prorate
, full
The number of units to charge for. If left null, then it will be required at subscription create time.
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
, null
round_up
- round_upround_down
- round_downround_nearest
- round_nearestno_rounding
- no_rounding
round_up
, round_down
, round_nearest
, no_rounding
, null
flat
- flatper_unit
- per_unitfree
- free
flat
, per_unit
, free
in_advance
- in_advancein_arrears
- in_arrears
in_advance
, in_arrears
percentage
- Percentagefixed
- Fixedprice_override
- Price Override
percentage
, fixed
, price_override
prorate
- proratefull
- full
prorate
, full
in_advance
- in_advancein_arrears
- in_arrears
in_advance
, in_arrears
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
, null
day
- dayweek
- weekmonth
- monthyear
- year
day
, week
, month
, year
, null
active
- Activeretiring
- Retiringgrandfathered
- Grandfathereddeleted
- Deletedinactive
- Inactivenot_started
- Not Started
active
, retiring
, grandfathered
, deleted
, inactive
, not_started
The id provided when creating the customer, we suggest matching with your internal customer id in your backend
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
curl --request GET \
--url https://api.uselotus.io/api/plans/ \
--header 'Authorization: <authorization>' \
--header 'X-API-KEY: <x-api-key>'