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 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.

    Note that multiple subscriptions on a customer results in a separate billing cycle, invoice, and charge for each subscription, even if the plans have the same billing interval and the subscriptions are created at the same time.

    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]=online-access
    curl https://api.stripe.com/v1/subscriptions \
       -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
       -d customer=cus_4fdAW5ftNQow1a \
       -d items[0][plan]=home-delivery
    
    # 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_4fdAW5ftNQow1a",
      :items => [
        {
          :plan => "online-access",
        },
      ],
    )
    
    Stripe::Subscription.create(
      :customer => "cus_4fdAW5ftNQow1a",
      :items => [
        {
          :plan => "home-delivery",
        },
      ],
    )
    
    # 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_4fdAW5ftNQow1a",
      items=[
        {
          "plan": "online-access",
        },
      ],
    )
    
    stripe.Subscription.create(
      customer="cus_4fdAW5ftNQow1a",
      items=[
        {
          "plan": "home-delivery",
        },
      ],
    )
    
    // 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_4fdAW5ftNQow1a",
      "items" => array(
        array(
          "plan" => "online-access",
        ),
      ),
    ));
    
    \Stripe\Subscription::create(array(
      "customer" => "cus_4fdAW5ftNQow1a",
      "items" => array(
        array(
          "plan" => "home-delivery",
        ),
      ),
    ));
    
    // 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> item = new HashMap<String, Object>();
    item.put("plan", "online-access");
    
    Map<String, Object> items = new HashMap<String, Object>();
    items.put("0", item);
    
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("customer", "cus_4fdAW5ftNQow1a");
    params.put("items", items);
    Subscription subscription = Subscription.create(params);
    
    Map<String, Object> item = new HashMap<String, Object>();
    item.put("plan", "home-delivery");
    
    Map<String, Object> items = new HashMap<String, Object>();
    items.put("0", item);
    
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("customer", "cus_4fdAW5ftNQow1a");
    params.put("items", items);
    Subscription subscription = 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_4fdAW5ftNQow1a",
      items: [
        {
          plan: "online-access",
        },
      ],
    }, function(err, subscription) {
      // asynchronously called
    });
    
    stripe.subscriptions.create({
      customer: "cus_4fdAW5ftNQow1a",
      items: [
        {
          plan: "home-delivery",
        },
      ],
    }, 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"
    
    params := &stripe.SubParams{
      Customer: "cus_4fdAW5ftNQow1a",
      Items: []*stripe.SubItemsParams{
        {
          Plan: "online-access",
        },
      },
    }
    subscription, err := sub.New(params)
    
    params := &stripe.SubParams{
      Customer: "cus_4fdAW5ftNQow1a",
      Items: []*stripe.SubItemsParams{
        {
          Plan: "home-delivery",
        },
      },
    }
    subscription, err := sub.New(params)
    

    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. The billing cycle for each subscription is different and dependent on when that subscription was created.

    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": "home-delivery",
              "object": "plan",
              "amount": 2995,
              ...
            }
          },
          {
            "id": "sub_9RRlIq2t9obFLI",
            "object": "subscription",
            ...
            "plan": {
              "id": "online-access",
              "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: