---
title: "Get a plan"
openapi: "openapi POST /v1/plans.get"
---
import { DynamicParamField } from "/snippets/dynamic-param-field.jsx";
import { DynamicResponseField } from "/snippets/dynamic-response-field.jsx";
import { DynamicResponseExample } from "/snippets/dynamic-response-example.jsx";
Retrieves a single plan by its ID. Returns the latest version by default.
### Common Use Cases
```typescript Get a plan
const plan = await autumn.plans.get({
planId: "pro_plan"
});
```
```typescript Get a specific version
const plan = await autumn.plans.get({
planId: "pro_plan",
version: 2
});
```
### Body Parameters
The ID of the plan to retrieve.
The version of the plan to get. Defaults to the latest version.
### Response
Unique identifier for the plan.
Display name of the plan.
Optional description of the plan.
Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
Version number of the plan. Incremented when plan configuration changes.
Whether this is an add-on plan that can be attached alongside a main plan.
If true, this plan is automatically attached when a customer is created. Used for free plans.
Base recurring price for the plan. Null for free plans or usage-only plans.
Base price amount for the plan.
Billing interval (e.g. 'month', 'year').
Number of intervals per billing cycle. Defaults to 1.
Display text for showing this price in pricing pages.
Main display text (e.g. '$10' or '100 messages').
Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.
The ID of the feature this item configures.
The full feature object if expanded.
The ID of the feature, used to refer to it in other API calls like /track or /check.
The name of the feature.
The type of the feature
Singular and plural display names for the feature.
The singular display name for the feature.
The plural display name for the feature.
Credit cost schema for credit system features.
The ID of the metered feature (should be a single_use feature).
The credit cost of the metered feature.
Whether or not the feature is archived.
Number of free units included. For consumable features, balance resets to this number each interval.
Whether the customer has unlimited access to this feature.
Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.
The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
Number of intervals between resets. Defaults to 1.
Pricing configuration for usage beyond included units. Null if feature is entirely free.
Price per billing_units after included usage is consumed. Mutually exclusive with tiers.
Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.
Billing interval for this price. For consumable features, should match reset.interval.
Number of intervals per billing cycle. Defaults to 1.
Number of units per price increment. Usage is rounded UP to the nearest billing_units when billed (e.g. billing_units=100 means 101 usage rounds to 200).
'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
Maximum units a customer can purchase beyond included. E.g. if included=100 and max_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
Display text for showing this item in pricing pages.
Main display text (e.g. '$10' or '100 messages').
Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
Rollover configuration for unused units. If set, unused included units roll over to the next period.
Maximum rollover units. Null for unlimited rollover.
Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
When rolled over units expire.
Number of periods before expiry.
Free trial configuration. If set, new customers can try this plan before being charged.
Number of duration_type periods the trial lasts.
Unit of time for the trial duration ('day', 'month', 'year').
Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
Unix timestamp (ms) when the plan was created.
Environment this plan belongs to ('sandbox' or 'live').
Whether the plan is archived. Archived plans cannot be attached to new customers.
If this is a variant, the ID of the base plan it was created from.
Miscellaneous plan-level configuration flags.
If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
Whether the trial on this plan is available to this customer. For example, if the customer used the trial in the past, this will be false.
The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
Whether the customer's active instance of this plan is set to cancel.
Whether the customer is currently on a free trial of this plan.
The action that would occur if this plan were attached to the customer.
```json 200
{
"id": "pro",
"name": "Pro Plan",
"description": null,
"group": null,
"version": 1,
"addOn": false,
"autoEnable": false,
"price": {
"amount": 10,
"interval": "month",
"display": {
"primaryText": "$10",
"secondaryText": "per month"
}
},
"items": [
{
"featureId": "messages",
"included": 100,
"unlimited": false,
"reset": {
"interval": "month"
},
"price": {
"amount": 0.5,
"interval": "month",
"billingUnits": 100,
"billingMethod": "usage_based",
"maxPurchase": null
},
"display": {
"primaryText": "100 messages",
"secondaryText": "then $0.5 per 100 messages"
}
},
{
"featureId": "users",
"included": 0,
"unlimited": false,
"reset": null,
"price": {
"amount": 10,
"interval": "month",
"billingUnits": 1,
"billingMethod": "prepaid",
"maxPurchase": null
},
"display": {
"primaryText": "$10 per Users"
}
}
],
"createdAt": 1771513979217,
"env": "sandbox",
"archived": false,
"baseVariantId": null,
"config": {
"ignore_past_due": false
}
}
```