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 by using the same create subscription code:

    curl https://api.stripe.com/v1/subscriptions \
       -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
       -d customer=cus_4fdAW5ftNQow1a \
       -d items[0][plan]=plan_CZB2krKbBDOkTS
    
    curl https://api.stripe.com/v1/subscriptions \
       -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
       -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_4eC39HqLyjWDarjtT1zdp7dc"
    
    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_4eC39HqLyjWDarjtT1zdp7dc"
    
    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_4eC39HqLyjWDarjtT1zdp7dc");
    
    $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_4eC39HqLyjWDarjtT1zdp7dc";
    
    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_4eC39HqLyjWDarjtT1zdp7dc");
    
    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_4eC39HqLyjWDarjtT1zdp7dc"
    
    items1 := []*stripe.SubscriptionItemsParams{
      {
        Plan: stripe.String("plan_CZB2krKbBDOkTS"),
      },
    }
    params1 := &stripe.SubscriptionParams{
      Customer: stripe.String("cus_4fdAW5ftNQow1a"),
      Items: items1,
    }
    subscription1, _ := sub.New(params1)
    
    items2 := []*stripe.SubscriptionItemsParams{
      {
        Plan: stripe.String("plan_CZB1AX3KOacNJw"),
      },
    }
    params2 := &stripe.SubscriptionParams{
      Customer: stripe.String("cus_4fdAW5ftNQow1a"),
      Items: items2,
    }
    subscription2, _ := sub.New(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
    StripeConfiguration.SetApiKey("sk_test_4eC39HqLyjWDarjtT1zdp7dc");
    
    var items1 = new List<SubscriptionItemOption> {
        new SubscriptionItemOption {PlanId = "plan_CZB2krKbBDOkTS"}
    };
    var options1 = new SubscriptionCreateOptions {
        Items = items1,
    };
    var service = new SubscriptionService();
    Subscription sub1 = service.Create(options1);
    
    var items2 = new List<SubscriptionItemOption> {
        new SubscriptionItemOption {PlanId = "plan_CZB1AX3KOacNJw"}
    };
    var options2 = new SubscriptionCreateOptions {
        CustomerId = "cus_4fdAW5ftNQow1a",
        Items = items2,
    };
    Subscription sub2 = service.Create(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:

    Questions?

    We're always happy to help with code or other questions you might have! Search our documentation, contact support, or connect with our sales team. You can also chat live with other developers in #stripe on freenode.

    Was this page helpful? Yes No

    Send

    Thank you for helping improve Stripe's documentation. If you need help or have any questions, please consider contacting support.