> For the complete documentation index, see [llms.txt](https://docs.licensespring.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.licensespring.com/integrations/stripe/stripe-example-use-cases.md).

# 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](/files/5872005927ba60ca961f0d347a44c3d59628ad0f)
{% 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](/files/8365c0dedfb0d47da8e1f61454124938021ee8a5)

![License policy options](/files/71860bbbab87a1e9a05db96815478555bb97b0cf)

![Select custom fields in policy](/files/623415a4e87dc341aa912fc66a6e24ab217e4b8c)
{% 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](/integrations/stripe/stripe-integration-legacy.md) 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](/files/1d10a5335a1431163c286954f7def724fd5375bc)

More details: [Stripe Integration](/integrations/stripe/stripe-integration-legacy.md)

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

![License policy code example](/files/0306d849227787d66f7fb42b9817b6d9862829ae)

![Custom attribute example](/files/7f66a9fffba5bb6ab0c3a391182f59228293259a)
{% 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.licensespring.com/integrations/stripe/stripe-example-use-cases.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
