> ## 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 Products

Use `Product.update` to create a Product and populate it with data.

```

 // Create a new product
 $product = new Product();
  
 // Identify the product by your unique identifier, etc.
 $product->setmerchantProductId('12345'); //SKU, Database ID, etc
  
 // This becomes transaction line item description if the 
 // product is used for an autobill, so this must be set 
 // to some meaningful string 
 $product->setDescription('Online subscription with video access'); 
  
 $product->setPreNotifyDays(7);
 $product->setStatus('Active');
 $product->setDefaultBillingPlan($billing_plan); 
    //From a previous update or fetch
  
 $product->merchantEntitlementIds[0] = 
    (new MerchantEntitlementId 
       id => 'Video Only',
       description => 'Video access'));
  
 $response = $product->update(DuplicateBehavior::SucceedIgnore);
  
 if($response['returnCode'] == 200) {
    print "ok\n";
    $prodVid = $product->getVID(); 
       // capture the product VID for later use
 }
```

When you create a `Product` object, Subscribe assigns it a globally unique Vindicia identifier (VID). As the preceding example illustrates, your application can capture the VID for later use.

The `Product` object also includes a data member called `merchantProductId`, which allows you to assign your own identifier, such as the stock-keeping unit (SKU), for the product. The `merchantProductId` **must**be unique for each `Product` object you define.

Like `BillingPlan` objects, `Product` objects are stable objects that are usually created at the start of a paid service by business analysts or people in business roles. The Subscribe Portal allows you to create and manipulate `Product` objects through a user interface. See the **Subscribe User Guide** for more information.

**Note:** Do not make changes to an active `Product` object once subscriptions are activated in the system (that is, once the related `Product`, `AutoBill`, and `BillingPlan` objects that reference a particular `Product` object are active). Create a new `Product` object instead.

The `Product` object supports several information-only attributes, such as `endOfLifeTimestamp` and `status`. These attributes may be used to sort or categorize your products.

`Product` objects can grant any number of token types. When a real-time or recurring transaction is made for a product that grants tokensSubscribe, Subscribe grants those tokens, and associates them with the `Account` object in question.

For more information, see Section 13: The Product Object in the **Subscribe API Guide.** For information on how the `Product` object affects entitlements, see [Creating Entitlements](Creating_Entitlements).

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


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