Working with Multiple Plans per Subscription

    Create subscriptions containing multiple plans or different variations of the same plan, all billed in a single invoice.

    Stripe offers the ability to simultaneously subscribe a customer to multiple plans on a single subscription. This provides another avenue for easily billing your customers in flexible ways. For example, if your business offers multiple products or services, each could be represented by its own plan and the same customer could be subscribed to more than one in a single subscription.

    Unlike our multiple subscriptions on a customer capability, which generates an invoice for each subscription, putting multiple plans into a single subscription results in a single invoice each billing period that combines every subscription. Only a single payment for that invoice is required, reducing your costs and the number of charges your customer sees.

    Creating multiple subscriptions

    Create multiple-plan subscriptions on a customer using the items parameter. Provide the plan and, optionally, a quantity (when using a value other than 1), for each plan:

    curl https://api.stripe.com/v1/subscriptions \
       -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
       -d customer=cus_91elFtZU3tt11g \
       -d items[0][plan]=basic-monthly \
       -d items[1][plan]=additional-license \
       -d items[1][quantity]=2
    
    # 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::Subscription.create(
      customer: "cus_91elFtZU3tt11g",
      items: [
        {
          plan: "basic-monthly",
        },
        {
          plan: "additional-license",
          quantity: 2,
        },
      ]
    )
    
    # 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.Subscription.create(
      customer="cus_91elFtZU3tt11g",
      items=[
            {
                "plan": "basic-monthly",
            },
            {
                "plan": "additional-license",
                "quantity": 2,
            },
        ]
    )
    
    // 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\Subscription::create(array(
      "customer" => "cus_91elFtZU3tt11g",
      "items" => array(
        array(
          "plan" => "basic-monthly",
        ),
        array(
          "plan" => "additional-license",
          "quantity" => 2,
        )
      )
    ));
    
    // 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> itemA = new HashMap<String, Object>();
    itemA.put("plan", "basic-monthly");
    
    Map<String, Object> itemB = new HashMap<String, Object>();
    itemB.put("plan", "additional-license");
    itemB.put("quantity", 2);
    
    Map<String, Object> items = new HashMap<String, Object>();
    items.put("0", itemA);
    items.put("1", itemB);
    
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("customer", "cus_91elFtZU3tt11g");
    params.put("items", items);
    Subscription.create(params);
    
    // 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.subscriptions.create({
      customer: "cus_91elFtZU3tt11g",
      items: [
        {
          plan: "basic-monthly",
        },
        {
          plan: "additional-license",
          quantity: 2,
        },
      ]
    }, function(err, subscription) {
      // 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.Key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"
    
    sub.New(&stripe.SubParams{
      Customer: "cus_91elFtZU3tt11g",
      Items: []*stripe.SubItemsParams{
        {
          Plan: "basic-monthly",
        },
        {
          Plan: "additional-license",
          Quantity: 2,
        },
      },
    })
    

    Restrictions

    Since putting multiple plans under a single subscription results in a single invoice and payment, all of the plans grouped together in a subscription must use the same currency and have the same billing interval. You are also limited to 20 plans in a single subscription.

    Discounts, taxes, and trial periods

    When using multiple plans on a single subscription, you can also create discounts, charge taxes, and use trial periods as you would with a single-plan subscription. Provide these as top-level arguments to the create or update subscription call, as they apply to the subscription at large:

    curl https://api.stripe.com/v1/subscriptions \
       -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
       -d customer=cus_91elFtZU3tt11g \
       -d coupon=free-period \
       -d tax_percent="6.34" \
       -d trial_end=1513850764 \
       -d items[0][plan]=basic-monthly \
       -d items[1][plan]=additional-license \
       -d items[1][quantity]=2
    
    # 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::Subscription.create(
      customer: "cus_91elFtZU3tt11g",
      coupon: "free-period",
      tax_percent: 6.34,
      trial_end: 1513850764,
      items: [
        {
          plan: "basic-monthly",
        },
        {
          plan: "additional-license",
          quantity: 2,
        },
      ]
    )
    
    # 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.Subscription.create(
      customer="cus_91elFtZU3tt11g",
      coupon="free-period",
      tax_percent=6.34,
      trial_end=1513850764,
      items=[
            {
                "plan": "basic-monthly",
            },
            {
                "plan": "additional-license",
                "quantity": 2,
            },
        ]
    )
    
    // 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\Subscription::create(array(
      "customer" => "cus_91elFtZU3tt11g",
      "coupon" => "free-period",
      "tax_percent" => 6.34,
      "trial_end" => 1513850764,
      "items" => array(
        array(
          "plan" => "basic-monthly",
        ),
        array(
          "plan" => "additional-license",
          "quantity" => 2,
        )
      )
    ));
    
    // 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> itemA = new HashMap<String, Object>();
    itemA.put("plan", "basic-monthly");
    
    Map<String, Object> itemB = new HashMap<String, Object>();
    itemB.put("plan", "additional-license");
    itemB.put("quantity", 2);
    
    Map<String, Object> items = new HashMap<String, Object>();
    items.put("0", itemA);
    items.put("1", itemB);
    
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("customer", "cus_91elFtZU3tt11g");
    params.put("coupon", "free-period");
    params.put("tax_percent", 6.34);
    params.put("trial_end", 1513850764);
    params.put("items", items);
    Subscription.create(params);
    
    // 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.subscriptions.create({
      customer: "cus_91elFtZU3tt11g",
      coupon: "free-period",
      tax_percent: 6.34,
      trial_end: 1513850764,
      items: [
        {
          plan: "basic-monthly",
        },
        {
          plan: "additional-license",
          quantity: 2,
        },
      ]
    }, function(err, subscription) {
      // 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.Key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"
    
    sub.New(&stripe.SubParams{
      Customer: "cus_91elFtZU3tt11g",
      Coupon: "free-period",
      TaxPercent: 6.34,
      TrialEnd: 1513850764,
      Items: []*stripe.SubItemsParams{
        {
          Plan: "basic-monthly",
        },
        {
          Plan: "additional-license",
          Quantity: 2,
        },
      },
    })
    

    Next steps

    Now that you understand how to use multiple plans on a single subscription, you may want to check out: