> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Bundled Products

Bundling Products allows you to offer special packages, in which multiple Products are included as a single item on the AutoBill. The price for a bundled Product is defined by the top-level Product, but this price may be overridden by the Billing Plan or AutoBill, if desired.

Create a bundled Product.

```

 $top_product = new Product();
 $top_product->setMerchantProductId('top-1');
 $top_product->update();
  
 $bundled1 = new Product();
 $bundled1->setMerchantProductId('sub-1');
 $bundled1->update();
  
 $bundled2 = new Product();
 $bundled2->setMerchantProductId('sub-2');
 $bundled2->update();
  
 // of course, other attributes can be set on the above products
  
 $top_product->bundledProducts(array($bundled1, $bundled2));
  
 $response = $top_product->update();
  
 if ($response['returnCode'] == 200) {
  
    $ret_prod = $response['data']->product;
    print "got product ", $ret_prod->merchantProductId(), "\n";
    $bundledProds = $ret_prod->bundledProducts();
  
    if ($bundledProds != null) {
       foreach ($bundledProds as $bp) {
       print $bp->merchantProductId(), " is bundled\n";
       }
    }
 }
```

**Note:** The price for a Bundled Product is defined by the top-level Product. This allows you to create groups of Products that may be purchased for one set price.

**Parent topic:**[Working with Products](../topics/ProgGuide_Products)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.