# Licensing

## Trial

You can try out Ucommerce without a license. If you run your application without a license, it will shut down after 10 minutes. You can restart your application as many times as you want, giving you ample time to play around with the product.

## Developer license

When you have played around with Ucommerce and decided to use it for your project, you will want to get a free perpetual developer license.

To get your Ucommerce developer license, please contact us at <license@ucommerce.net>, with your company name and contact email address, and we will create a license for you or your company.

### Test environments

Ucommerce uses two ways to detect if the environment is test or production:

* The host environment
* The domain name of requests

#### Marking the host environment as a development environment

To make sure that the test environment is recognized as a development environment, it can be necessary to mark it as such. See [Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-8.0#set-the-environment-by-setting-an-environment-variable) for details.

#### Using test domain names

When using a developer license, make sure to access your test environment(s) through a domain name that includes one of the following:

* *localhost*
* *dev*
* *test*
* *uat*

Otherwise, Ucommerce will consider your instance as a **production environment**. Other (partial) domain names can be whitelisted. Please [contact us](mailto:license@ucommerce.net) with the values you would like to have whitelisted.

{% hint style="info" %}
An example of an allowed domain name is **test.mysite.com**
{% endhint %}

## Using your license

To add your license key to the application, simply add it to the configuration.

{% hint style="info" %}
It is recommended that you use [user secrets](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-8.0#security-and-user-secrets) and/or a key vault, e.g. [Azure Key Vault](https://learn.microsoft.com/en-us/aspnet/core/security/key-vault-configuration?view=aspnetcore-8.0), to store your license key(s).
{% endhint %}

The `LicenseKey` property can be found under the `Ucommerce` object. It should look like this in your user secrets file:

```json
{
    "Ucommerce:LicenseKey": "XXXX-XXXX-XXXX-XXXX"
}
```

## Production license

When your project is ready for production, please [reach out to us](mailto:license@ucommerce.net) to get a new license key.


---

# Agent Instructions: 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:

```
GET https://dev.ucommerce.net/readme/getting-started/licensing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
