# Plans

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


Specifies the price with billing frequency for a subscription. Create separate plans for varied price or billing frequency. For example, if you need to charge $10 per month for a group of customers and $100 per year for another group of customers, then create separate plans for each.

## Sample Plan

```json
{
  "charge_model": "flat_fee",
  "enabled_in_hosted_pages": true,
  "enabled_in_portal": true,
  "free_quantity": 0,
  "id": "silver",
  "invoice_name": "sample plan",
  "name": "Silver",
  "object": "plan",
  "period": 1,
  "period_unit": "month",
  "price": 5000,
  "status": "active",
  "taxable": true
}
```

## Plans attributes

## Input Parameters

- `id` (required, string, max chars=100)
  A unique ID for your system to identify the plan.

- `name` (required, string, max chars=100)
  The display name used in web interface for identifying the plan.

- `invoice_name` (optional, string, max chars=100)
  Display name used in invoice. If it is not configured then name is used in invoice.

- `description` (optional, string, max chars=2000)
  Description about the plan to show in the hosted pages & customer portal.

- `price` (optional, in cents, min=0)
  The price of the plan. The unit depends on the [type of currency](/docs/api/getting-started) .

- `period` (required, integer, default=1, min=1)
  Defines billing frequency. Example: to bill customer every 3 months, provide "3" here.

- `period_unit` (required, enumerated string, default=month)
  Defines billing frequency in association with billing period.
  Possible enum values:
    - `day`
      Charge based on day(s)
    - `week`
      Charge based on week(s)
    - `month`
      Charge based on month(s)
    - `year`
      Charge based on year(s)

- `trial_period` (optional, integer, min=1)
  The free time window for your customer to try your product

- `trial_period_unit` (optional, enumerated string)
  Time unit for the trial period.
  Possible enum values:
    - `day`
      In days
    - `month`
      In months

- `charge_model` (required, enumerated string)
  Defines how the subscription recurring charge for this plan should be calculated.
  Possible enum values:
    - `flat_fee`
      Charge a single price on recurring basis
    - `per_unit`
      Charge the price for each unit of the plan for the subscription on recurring basis.

- `free_quantity` (required, integer, default=0, min=0)
  Free quantity the subscriptions of this plan will have. Only the quantity more than this will be charged for the subscription.

- `setup_cost` (optional, in cents, min=1)
  One-time setup fee charged as part of the first invoice.

- `status` (required, enumerated string, default=active)
  The plan state
  Possible enum values:
    - `active`
      New subscriptions can be created with the plan.
    - `archived`
      No new subscriptions allowed for the plan. Existing subscriptions on this plan will remain as-is and can be migrated to another active plan if required.
    - `deleted`
      Indicates the plan has been deleted.

- `archived_at` (optional, timestamp(UTC) in seconds)
  Time at which the plan was moved to archived status.

- `billing_cycles` (optional, integer, min=1)
  The number of billing cycles the subscription is active. The subscription is moved to non renewing state and then to cancelled state automatically

- `redirect_url` (optional, string, max chars=500)
  The url to redirect on successful checkout. Eg: https://yoursite.com/success.html?plan=basic

- `enabled_in_hosted_pages` (required, boolean, default=true)
  If true, allow checkout through plan specific hosted page URL for this plan.

- `enabled_in_portal` (required, boolean, default=true)
  If enabled, customers can switch to this plan using the 'Change Subscription' option in the customer portal.

- `invoice_notes` (optional, string, max chars=2000)
  A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices/invoice-object#notes) displayed on the invoice PDF.

- `taxable` (optional, boolean, default=true)
  Specifies if the plan should be taxed or not

- `meta_data` (optional, jsonobject)
  A set of key-value pairs stored as additional information for the plan. [Learn more](/docs/api/v1/plans) .

