Customers
Invoices
Wallets
Entitlements
Environments
Events
Features
Payments
Integrations
Subscriptions
Tenants
Users
Get plans
Get plans with optional filtering
curl --request GET \
--url https://api.cloud.flexprice.io/v1/plans \
--header 'x-api-key: <api-key>'
{
"items": [
{
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"entitlements": [
{
"created_at": "<string>",
"created_by": "<string>",
"environment_id": "<string>",
"feature": {
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"field": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"name": "<string>",
"status": "published",
"tenant_id": "<string>",
"type": "metered",
"unit_plural": "<string>",
"unit_singular": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"feature_id": "<string>",
"feature_type": "metered",
"id": "<string>",
"is_enabled": true,
"is_soft_limit": true,
"plan": {},
"plan_id": "<string>",
"static_value": "<string>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>",
"usage_limit": 123,
"usage_reset_period": "MONTHLY"
}
],
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"name": "<string>",
"prices": [
{
"amount": 123,
"billing_cadence": "RECURRING",
"billing_model": "FLAT_FEE",
"billing_period": "MONTHLY",
"billing_period_count": 123,
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"description": "<string>",
"display_amount": "<string>",
"environment_id": "<string>",
"id": "<string>",
"invoice_cadence": "ARREAR",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"field": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"plan_id": "<string>",
"status": "published",
"tenant_id": "<string>",
"tier_mode": "VOLUME",
"tiers": [
{
"flat_amount": 123,
"unit_amount": 123,
"up_to": 123
}
],
"transform_quantity": {
"divide_by": 123,
"round": "<string>"
},
"trial_period": 123,
"type": "USAGE",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}
Authorizations
Enter your API key in the format x-api-key <api-key>*
Query Parameters
1 <= x <= 1000
x >= 0
asc
, desc
published
, deleted
, archived
Response
"2024-03-20T15:04:05Z"
"api_request"
"550e8400-e29b-41d4-a716-446655440000"
"API Usage Meter"
BILLING_PERIOD
, NEVER
"published"
"tenant123"
"2024-03-20T15:04:05Z"
published
, deleted
, archived
metered
, boolean
, static
metered
, boolean
, static
metered
, boolean
, static
published
, deleted
, archived
MONTHLY
, ANNUAL
, WEEKLY
, DAILY
, QUARTERLY
, HALF_YEARLY
Amount stored in main currency units (e.g., dollars, not cents) For USD: 12.50 means $12.50
RECURRING
, ONETIME
FLAT_FEE
, PACKAGE
, TIERED
MONTHLY
, ANNUAL
, WEEKLY
, DAILY
, QUARTERLY
, HALF_YEARLY
BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12
Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp
Description of the price
DisplayAmount is the formatted amount with currency symbol For USD: $12.50
EnvironmentID is the environment identifier for the price
ID uuid identifier for the price
ARREAR
, ADVANCE
LookupKey used for looking up the price in the database
MeterID is the id of the meter for usage based pricing
PlanID is the id of the plan for plan based pricing
published
, deleted
, archived
VOLUME
, SLAB
TrialPeriod is the number of days for the trial period Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)
USAGE
, FIXED
published
, deleted
, archived
published
, deleted
, archived
MONTHLY
, ANNUAL
, WEEKLY
, DAILY
, QUARTERLY
, HALF_YEARLY
Amount stored in main currency units (e.g., dollars, not cents) For USD: 12.50 means $12.50
RECURRING
, ONETIME
FLAT_FEE
, PACKAGE
, TIERED
MONTHLY
, ANNUAL
, WEEKLY
, DAILY
, QUARTERLY
, HALF_YEARLY
BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12
Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp
Description of the price
DisplayAmount is the formatted amount with currency symbol For USD: $12.50
EnvironmentID is the environment identifier for the price
ID uuid identifier for the price
ARREAR
, ADVANCE
LookupKey used for looking up the price in the database
Field is the key in $event.properties on which the aggregation is to be applied For ex if the aggregation type is sum for API usage, the field could be "duration_ms"
COUNT
, SUM
, AVG
, COUNT_UNIQUE
"2024-03-20T15:04:05Z"
"api_request"
Key is the key for the filter from $event.properties Currently we support only first level keys in the properties and not nested keys
Values are the possible values for the filter to be considered for the meter For ex "model_name" could have values "o1-mini", "gpt-4o" etc
"550e8400-e29b-41d4-a716-446655440000"
"API Usage Meter"
BILLING_PERIOD
, NEVER
"published"
"tenant123"
"2024-03-20T15:04:05Z"
MeterID is the id of the meter for usage based pricing
PlanID is the id of the plan for plan based pricing
published
, deleted
, archived
VOLUME
, SLAB
FlatAmount is the flat amount for the given tier and it is applied on top of the unit amount*quantity. It solves cases in banking like 2.7% + 5c
UnitAmount is the amount per unit for the given tier
Upto is the quantity up to which this tier applies. It is null for the last tier
TrialPeriod is the number of days for the trial period Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)
USAGE
, FIXED
published
, deleted
, archived
curl --request GET \
--url https://api.cloud.flexprice.io/v1/plans \
--header 'x-api-key: <api-key>'
{
"items": [
{
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"entitlements": [
{
"created_at": "<string>",
"created_by": "<string>",
"environment_id": "<string>",
"feature": {
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"field": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"name": "<string>",
"status": "published",
"tenant_id": "<string>",
"type": "metered",
"unit_plural": "<string>",
"unit_singular": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"feature_id": "<string>",
"feature_type": "metered",
"id": "<string>",
"is_enabled": true,
"is_soft_limit": true,
"plan": {},
"plan_id": "<string>",
"static_value": "<string>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>",
"usage_limit": 123,
"usage_reset_period": "MONTHLY"
}
],
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"name": "<string>",
"prices": [
{
"amount": 123,
"billing_cadence": "RECURRING",
"billing_model": "FLAT_FEE",
"billing_period": "MONTHLY",
"billing_period_count": 123,
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"description": "<string>",
"display_amount": "<string>",
"environment_id": "<string>",
"id": "<string>",
"invoice_cadence": "ARREAR",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"field": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"plan_id": "<string>",
"status": "published",
"tenant_id": "<string>",
"tier_mode": "VOLUME",
"tiers": [
{
"flat_amount": 123,
"unit_amount": 123,
"up_to": 123
}
],
"transform_quantity": {
"divide_by": 123,
"round": "<string>"
},
"trial_period": 123,
"type": "USAGE",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}