# Stripe Example Use Cases

If you want customers to be able to buy two different license types (with different custom fields) for the same product, follow these steps:

{% stepper %}
{% step %}

### Create the necessary custom fields inside your product in LicenseSpring

* In LicenseSpring, open the Products tab and select the product you want to use.
* Open the Custom fields section of the product and click "Add custom fields".
* In the pop-up window, fill out the necessary details and click "Confirm". Repeat for each custom field you need.

![Add custom fields](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/I3Fm9AwsorWbuuPrRcPq/lLSRiAtle0jQAm4z9kNCJ_screenshot%202024%2003%2021%20at%20130919.png)
{% endstep %}

{% step %}

### Create the necessary license policies for each license type

* On the same product, go to the License policies section and click "Add license policy".
* In the pop-up, choose the appropriate options for the license (for example, select subscription if needed).
* License policies can override some product settings without changing the product itself.
* In the pop-up, select the custom fields to use for this license policy and update their default values if needed.

![Add license policy](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/nYVf78SHCgg55h1erdzy/UqwtuNTJtLFI91fl7V6vx_screenshot%202024%2003%2021%20at%20135830.png)

![License policy options](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/HCM9GhE9rdbAB2MTux9j/glbyRtxugnHYvaRGYhUo9_screenshot%202024%2003%2021%20at%20143315.png)

![Select custom fields in policy](broken-reference)
{% endstep %}

{% step %}

### Create a price for each license type in Stripe and add the license policy code to price metadata

* In Stripe, open the corresponding Stripe product linked to the LicenseSpring product. (If you haven't created/connected it, follow the [Stripe Integration](https://docs.licensespring.com/integrations/stripe/stripe-integration-legacy) setup.)
* If the Stripe product doesn't already have separate prices for each license type, click "Add another price" and create the prices with the required details.
* Open the Price page for a price, click "Edit metadata", and add the custom attributes and the license policy code.
  * Add the attribute name license\_policy with the license policy code you created in LicenseSpring.

![Edit price metadata](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/UkXa2iylgPVdp9EAlLox/4X635XHCGg9m838tWoBNt_screenshot%202024%2003%2021%20at%20150206.png)

More details: [Stripe Integration](https://docs.licensespring.com/integrations/stripe/stripe-integration-legacy)

Example: add attribute license\_policy with the policy code shown in LicenseSpring.

![License policy code example](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/pbfBiqW8Rmzen1Hr0DCN/IFpLG9FcuX2Rsgu0AahJz_screenshot%202024%2003%2021%20at%20155500.png)

![Custom attribute example](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/CgpmuqfwMRADg0qccZlb/prhtH5fbquzhpKk9HWm93_screenshot%202024%2003%2021%20at%20155444.png)
{% endstep %}

{% step %}

### Double check everything

* Ensure the product in LicenseSpring has the two different license policies (and any required custom fields/features).
* Ensure the corresponding Stripe product has two different prices, each with correct metadata including its license\_policy and any other custom attributes you want to use.
  {% endstep %}
  {% endstepper %}
