Managing Plans

Creating Plans

Create a plan using the dashboard

Create a plan using the dashboard

Plans have the following parameters:

  • id: a value to identify the plan to the API. Unlike other IDs that are auto-generated by Stripe, this ID is specified by you and must be unique across all the plans in your Stripe account.

  • name: a user-friendly label for the plan that’ll be seen by you in your dashboard, and possibly by your customers on receipts.

  • amount: what the customer will be charged per subscription per interval. For simple subscriptions, a customer might have a single subscription that costs $9.99/month. In more advanced uses of subscriptions, a customer might have 5 subscriptions to a single plan and would pay $49.95/month (e.g., 5 * $9.99).

  • interval: the billing period for the plan, which can range from a single day to a year. The interval options are day, week, month, or year. You can also use the interval_count to set more customized intervals, such as billing a customer every 30 days or every 5 months. If you’d like to test subscription behavior by creating a subscription that bills sooner than one day from its creation, one thing you can do is set a trial_end to some point in the near future via the API.

  • trial_period_days: An optional number used when working with trials.

You can create a plan either via the API or through the Dashboard.

The creation of a plan via the API looks like:

# Set your secret key: remember to change this to your live secret key in production
# See your keys here: https://dashboard.stripe.com/account/apikeys
Stripe.api_key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"

Stripe::Plan.create(
  :amount => 2000,
  :interval => 'month',
  :name => 'Amazing Gold Plan',
  :currency => 'usd',
  :id => 'gold'
)
# Set your secret key: remember to change this to your live secret key in production
# See your keys here: https://dashboard.stripe.com/account/apikeys
stripe.api_key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"

stripe.Plan.create(
  amount=2000,
  interval="month",
  name="Amazing Gold Plan",
  currency="usd",
  id="gold"
)
// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
\Stripe\Stripe::setApiKey("sk_test_BQokikJOvBiI2HlWgH4olfQ2");

\Stripe\Plan::create(array(
  "amount" => 2000,
  "interval" => "month",
  "name" => "Amazing Gold Plan",
  "currency" => "usd",
  "id" => "gold")
);
// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
var stripe = require("stripe")("sk_test_BQokikJOvBiI2HlWgH4olfQ2");

stripe.plans.create({
  amount: 2000,
  interval: "month",
  name: "Amazing Gold Plan",
  currency: "usd",
  id: "gold"
}, function(err, plan) {
  // asynchronously called
});
// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
Stripe.apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2";

Map<String, Object> planParams = new HashMap<String, Object>();
planParams.put("amount", 2000);
planParams.put("interval", "month");
planParams.put("name", "Amazing Gold Plan");
planParams.put("currency", "usd");
planParams.put("id", "gold");

Plan.create(planParams);

Next Steps

Changing and Deleting Plans

Once a plan has been created, only the metadata and statement description can be modified—the billing amount or interval cannot. Should any changes to these parameters be needed, a new plan must be created instead. This avoids the potential surprise of changing the amount that existing users are billed, and the confusion of having some customers on different price points with the same plan.

If you only want to subscribe new customers to the new plan price, create a new plan. This makes it clearer which customers are subscribed to each plan, as each plan’s ID is different.

To switch all your customers over to the new plan pricing, update each existing customer’s subscription to the new plan. To prorate the plan switch, update the existing subscription using the API. Depending on the new plan, this may reset the billing cycle.

If you’d rather charge customers the full amount of the new plan, cancel their subscriptions before subscribing them to the new plan. This resets the customer’s billing cycle.

Deleting a plan does not affect any existing subscribers of that plan, but new customers cannot be subscribed to it.

Working with local currencies

A plan’s currency is set at the time of plan creation. If you’d like to offer the same plan in multiple currencies, you’d have to create separate plans.

Likewise, customer objects are tethered to the currency in which you first charge them. If a customer subscribes to a plan denominated in USD but would later like to be billed in GBP, you wouldn’t be able to subscribe her to a plan in a different currency as she’s already denominated as a USD customer. In this case, you would have to create an entirely new customer object.