Skip to content

Stripe: List all plans

Stripe plans.getPlans: arguments, response, policy and SDK examples.

← Plans operations · Get started

Operation stripe.getplans

Provider route: GET /v1/plans. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["plans"]["getPlans"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.plans.getPlans(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.plans.get_plans(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.activebooleanOptional
query.createdJSONOptional
query.created (anyOf 1)objectAlternative
query.created (anyOf 1).gtintegerOptional
query.created (anyOf 1).gteintegerOptional
query.created (anyOf 1).ltintegerOptional
query.created (anyOf 1).lteintegerOptional
query.created (anyOf 2)integerAlternative
query.ending_beforestringOptionalMaximum length: 5000
query.expandarrayOptional
query.expand[]stringEach itemMaximum length: 5000
query.limitintegerOptional
query.productstringOptionalMaximum length: 5000
query.starting_afterstringOptionalMaximum length: 5000

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRoot
dataarrayRequired within parentDetails about each object.
data[]ModelEach itemExpand Create a plan — response body
has_morebooleanRequired within parentTrue if this list has another page of items after this one that can be fetched.
objectstringRequired within parentString representing the object’s type. Objects of the same type share the same value. Always has the value `list`.
Known values: list
urlstringRequired within parentThe URL where this list can be accessed.
Maximum length: 5000
Pattern: ^/v1/plans

Referenced models: Create a plan — response body

10 more schemas are linked from the tables above, on the schema pages.

Create a plan — response body
FieldTypePresenceDescription and constraints
$objectRootYou can now model subscriptions more flexibly using the [Prices API](https://docs.stripe.com/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.

Plans define the base price, currency, and billing cycle for recurring purchases of products.
[Products](https://docs.stripe.com/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.

Related guides: [Set up a subscription](https://docs.stripe.com/billing/subscriptions/set-up-subscription) and more about [products and prices](https://docs.stripe.com/products-prices/overview).
activebooleanRequired within parentWhether the plan can be used for new purchases.
amountJSONOptional
amount (anyOf 1)JSONAlternative
amount (anyOf 1) (anyOf 1)integerAlternativeThe unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
amount (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
amount (anyOf 2)nullAlternative
amount_decimalJSONOptional
amount_decimal (anyOf 1)stringAlternativeThe unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
Format: decimal
amount_decimal (anyOf 2)nullAlternative
billing_schemestringRequired within parentDescribes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
Known values: per_unit, tiered
createdJSONRequired within parent
created (anyOf 1)integerAlternativeTime at which the object was created. Measured in seconds since the Unix epoch.
Format: unix-time
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
currencystringRequired within parentThree-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Format: currency
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
intervalstringRequired within parentThe frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
Known values: day, month, week, year
interval_countJSONRequired within parent
interval_count (anyOf 1)integerAlternativeThe number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
interval_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataJSONOptional
metadata (anyOf 1)objectAlternativeSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Additional keys: see wildcard field
metadata (anyOf 1).*stringAdditional keysMaximum length: 500
metadata (anyOf 2)nullAlternative
meterJSONOptional
meter (anyOf 1)stringAlternativeThe meter tracking the usage of a metered price
Maximum length: 5000
meter (anyOf 2)nullAlternative
nicknameJSONOptional
nickname (anyOf 1)stringAlternativeA brief description of the plan, hidden from customers.
Maximum length: 5000
nickname (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: plan
productJSONOptional
product (anyOf 1)JSONAlternativeThe product whose pricing this plan determines.
product (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
product (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a product — response body
product (anyOf 1) (anyOf 3)ModelAlternativeExpand Delete a product — response body
product (anyOf 2)nullAlternative
tiersarrayOptionalEach element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
tiers[]ModelEach itemExpand Create a plan — response body — tiers item
tiers_modeJSONOptional
tiers_mode (anyOf 1)stringAlternativeDefines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.
Known values: graduated, volume
tiers_mode (anyOf 2)nullAlternative
transform_usageJSONOptional
transform_usage (anyOf 1)JSONAlternativeApply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
transform_usage (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a plan — response body — transform_usage / value / round: down, up
transform_usage (anyOf 2)nullAlternative
trial_period_daysJSONOptional
trial_period_days (anyOf 1)JSONAlternative
trial_period_days (anyOf 1) (anyOf 1)integerAlternativeDefault number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://docs.stripe.com/api#create_subscription-trial_from_plan).
trial_period_days (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
trial_period_days (anyOf 2)nullAlternative
usage_typestringRequired within parentConfigures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
Known values: licensed, metered

Referenced models: Delete a product — response body, Create a plan — response body — tiers item, Create a product — response body, Create a plan — response body — transform_usage / value / round: down, up

Delete a product — response body
FieldTypePresenceDescription and constraints
$objectRoot
deletedbooleanRequired within parentAlways true for a deleted object
Known values: True
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: product
Create a plan — response body — tiers item
FieldTypePresenceDescription and constraints
$objectRoot
flat_amountJSONOptional
flat_amount (anyOf 1)JSONAlternative
flat_amount (anyOf 1) (anyOf 1)integerAlternativePrice for the entire tier.
flat_amount (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
flat_amount (anyOf 2)nullAlternative
flat_amount_decimalJSONOptional
flat_amount_decimal (anyOf 1)stringAlternativeSame as `flat_amount`, but contains a decimal value with at most 12 decimal places.
Format: decimal
flat_amount_decimal (anyOf 2)nullAlternative
unit_amountJSONOptional
unit_amount (anyOf 1)JSONAlternative
unit_amount (anyOf 1) (anyOf 1)integerAlternativePer unit price for units relevant to the tier.
unit_amount (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
unit_amount (anyOf 2)nullAlternative
unit_amount_decimalJSONOptional
unit_amount_decimal (anyOf 1)stringAlternativeSame as `unit_amount`, but contains a decimal value with at most 12 decimal places.
Format: decimal
unit_amount_decimal (anyOf 2)nullAlternative
up_toJSONOptional
up_to (anyOf 1)JSONAlternative
up_to (anyOf 1) (anyOf 1)integerAlternativeUp to and including to this quantity will be contained in the tier.
up_to (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
up_to (anyOf 2)nullAlternative
Create a product — response body — marketing features item
FieldTypePresenceDescription and constraints
$objectRoot
namestringOptionalThe marketing feature name. Up to 80 characters long.
Maximum length: 5000

SDK function policy ID: stripe.getplans. Catalog operation: GetPlans. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.