Working with Multiple Subscriptions

    Create multiple subscriptions for a single customer by subscribing them to more than one plan or different variations of the same plan.

    Stripe offers the ability to simultaneously create multiple subscriptions on a single customer. This capability is useful when you want to make it possible for your customers to subscribe to multiple plans with separate intervals. Each subscription has its own separate billing cycle, invoice, and charge—even if the underlying plans have the same billing interval.

    If you want to subscribe a customer to multiple plans with a single billing cycle and invoice, you can combine multiple plans in one subscription instead of using multiple subscriptions.

    Create multiple subscriptions on a customer simply using the same create subscription code:

    curl https://api.stripe.com/v1/subscriptions \
       -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
       -d customer=cus_4fdAW5ftNQow1a \
       -d items[0][plan]=plan_CZB2krKbBDOkTS
    
    curl https://api.stripe.com/v1/subscriptions \
       -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
       -d customer=cus_4fdAW5ftNQow1a \
       -d items[0][plan]=plan_CZB1AX3KOacNJw
    
    # 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"
    
    sub1 = Stripe::Subscription.create({
        customer: 'cus_4fdAW5ftNQow1a',
        items: [{plan: 'plan_CZB2krKbBDOkTS'}],
    })
    
    sub2 = Stripe::Subscription.create({
        customer: 'cus_4fdAW5ftNQow1a',
        items: [{plan: 'plan_CZB1AX3KOacNJw'}],
    })
    
    # 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"
    
    sub1 = stripe.Subscription.create(
      customer='cus_4fdAW5ftNQow1a',
      items=[{'plan': 'plan_CZB2krKbBDOkTS'}],
    )
    
    sub2 = stripe.Subscription.create(
      customer='cus_4fdAW5ftNQow1a',
      items=[{'plan': 'plan_CZB1AX3KOacNJw'}],
    )
    
    // 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");
    
    $sub1 = \Stripe\Subscription::create([
        'customer' => 'cus_4fdAW5ftNQow1a',
        'items' => [['plan' => 'plan_CZB2krKbBDOkTS']],
    ]);
    
    $sub2 = \Stripe\Subscription::create([
        'customer' => 'cus_4fdAW5ftNQow1a',
        'items' => [['plan' => 'plan_CZB1AX3KOacNJw']],
    ]);
    
    // 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> item1 = new HashMap<>();
    item1.put("plan", "plan_CZB2krKbBDOkTS");
    Map<String, Object> items1 = new HashMap<>();
    items1.put("0", item1);
    Map<String, Object> params1 = new HashMap<>();
    params1.put("customer", "cus_4fdAW5ftNQow1a");
    params1.put("items", items1);
    Subscription sub1 = Subscription.create(params1);
    
    Map<String, Object> item2 = new HashMap<>();
    item2.put("plan", "plan_CZB1AX3KOacNJw");
    Map<String, Object> items2 = new HashMap<>();
    items2.put("0", item2);
    Map<String, Object> params2 = new HashMap<>();
    params2.put("customer", "cus_4fdAW5ftNQow1a");
    params2.put("items", items2);
    Subscription sub2 = Subscription.create(params2);
    
    // 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");
    
    const sub1 = stripe.subscriptions.create({
      customer: 'cus_4fdAW5ftNQow1a',
      items: [{plan: 'plan_CZB2krKbBDOkTS'}],
    });
    
    const sub2 = stripe.subscriptions.create({
      customer: 'cus_4fdAW5ftNQow1a',
      items: [{plan: 'plan_CZB1AX3KOacNJw'}],
    });
    
    // 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"
    
    items1 := []*stripe.SubItemsParams{
      {Plan: "plan_CZB2krKbBDOkTS",},
    }
    params1 := &stripe.SubParams{
      Customer: "cus_4fdAW5ftNQow1a",
      Items: items1,
    }
    subscription1, _ := sub.New(params)
    
    items2 := []*stripe.SubItemsParams{
      {Plan: "plan_CZB2krKbBDOkTS",},
    }
    params2 := &stripe.SubParams{
      Customer: "cus_4fdAW5ftNQow1a",
      Items: items2,
    }
    subscription2, _ := sub.New(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
    StripeConfiguration.SetApiKey("sk_test_BQokikJOvBiI2HlWgH4olfQ2");
    
    var items1 = new List<StripeSubscriptionItemOption> {
        new StripeSubscriptionItemOption {PlanId = "plan_CZB2krKbBDOkTS"}
    };
    var options1 = new StripeSubscriptionCreateOptions {
        Items = items1,
    };
    var service = new StripeSubscriptionService();
    StripeSubscription sub1 = service.Create("cus_4fdAW5ftNQow1a", options1);
    
    var items2 = new List<StripeSubscriptionItemOption> {
        new StripeSubscriptionItemOption {PlanId = "plan_CZB1AX3KOacNJw"}
    };
    var options2 = new StripeSubscriptionCreateOptions {
        Items = items2,
    };
    StripeSubscription sub2 = service.Create("cus_4fdAW5ftNQow1a", options2);
    

    A customer can be subscribed to multiple plans or even to a single plan multiple times. Each subscription has a unique ID and its state is handled independently from the customer’s other subscriptions. Each subscription also has its own independent billing cycle, based on the billing cycle anchor of the subscription.

    When a customer has multiple subscriptions, the Customer object’s subscriptions property provides a list of every subscription:

    {
      "id": "cus_4fdAW5ftNQow1a",
      "object": "customer",
      "subscriptions": {
        "object": "list",
        "data": [
          {
            "id": "sub_9RRl3XywPg2P5H",
            "object": "subscription",
            ...
            "plan": {
              "id": "plan_CZB2krKbBDOkTS",
              "object": "plan",
              "amount": 2995,
              ...
            }
          },
          {
            "id": "sub_9RRlIq2t9obFLI",
            "object": "subscription",
            ...
            "plan": {
              "id": "plan_CZB1AX3KOacNJw",
              "object": "plan",
              "amount": 1295,
              ...
            }
          },
        ]
        ...
      }
      ...
    }
    

    Next steps

    Now that you understand how to create multiple subscriptions on a single customer, you may want to check out: