# Product Licensing

https://docs.wisecp.com/fr/product-licensing

The Licensing tab protects a software product with a license, checked either by the domain it runs on or by a unique key issued for every order.

## Opening the Screen

Open a product for editing from the Products menu, then click the **Licensing** tab: `{admin}/products/edit?id={id}&configuration=licensing`.

The tab only appears for products whose type is **Software**; other product types never show it.

## What Is on the Screen

The tab is a single column of blocks, read from top to bottom in the order the work is done.

### License Model

Two choices sit side by side. **Domain Name Based** suits software that runs under one domain, such as a theme or a script. It has nothing further to set.

**License Key Based** suits desktop software, services and plugins. Its settings open right under the choice: **Prefix**, **Length**, **Character Set** and a live **Preview**.

### Query Parameters

This block appears only for the key model. It has two parts.

- **Always Sent by the System**: the three fixed values `key`, `ip` and `domain`.
- **Your Own Parameters**: the rows you add, for example a MAC address.

### Verification Policy

Two settings: **License Checking Time** and **Accept Legacy (V3) Requests**.

### Integration Details

The values your software needs: the **Check URL**, the **Verification Key (public)** card, and the `licence.php` file. The key card shows its number, its issue date, and a **Fingerprint** you can compare with the key inside your software.

A fifth block, **Developer Reference**, stays closed. Click **Open** to see the request fields, the expected answer and the signed string.

## Fields

- **Prefix**: Text placed in front of the key, for example `MYSOFT`. Optional.
- **Length**: Character count of the key body, not counting the prefix. Minimum and default are both 15.
- **Character Set**: Which characters the key uses: uppercase, lowercase, numbers, special characters, and whether groups are separated with a dash.
- **License Model**: Domain Name Based or License Key Based. Required. The blocks below follow the choice.
- **License Checking Time**: How often the copied file re-checks the license, for example every 1 day. Not saved with the product. It shapes the file you copy now and returns to 1 day when you open the tab again.
- **Accept Legacy (V3) Requests**: On by default. While it is on, a request without a nonce gets the old plain OK or ERROR answer. Turn it off once every copy you sell verifies signatures.
- **Check URL**: The address your software calls. You cannot change it. Use the copy button next to it.
- **Verification Key (public)**: The key you embed in your software. It only verifies answers and cannot produce them. **Show Key** opens it, **Copy Key** copies it.
- **Query Parameters**: Every row except key can be Locked to the first value seen and shown in the Client Area. Only domain can also be marked Required. key and ip are always required, and rows you add are always optional.

## Tasks

### Choosing the license model

1. In **License Model**, click **Domain Name Based** or **License Key Based**.
2. The settings of the chosen model open below, and the other model's blocks close.
3. Click **Save Changes** at the bottom of the page.

Result: the product now issues licenses with the chosen model. The other model's settings stay saved.

### Issuing the verification key

1. Go to **Integration Details**. If no key exists yet, the card reads **Not Issued Yet**.
2. Click **Issue Key**.

Result: WISECP creates a key pair for this product. The card shows the key number, the issue date and the fingerprint. This step is applied at once and does not wait for **Save Changes**.

### Preparing the software

1. In **License Model**, set **Prefix**, **Length** and **Character Set**. The preview updates as you go.
2. In **Verification Policy**, set **License Checking Time** before you copy the file.
3. In **Integration Details**, copy the **Check URL**, then click **Copy** on the `licence.php` card.
4. Add the copied file to your software and click **Save Changes**.

Result: every new order for this product gets its own license key, shown to the client in the service details. Your software checks it as often as you set.

### Adding your own parameter

1. In **Query Parameters**, find the **Your Own Parameters** part and click **Add Parameter**.
2. Fill in the variable name and title, then tick Locking, Client Area, or both.
3. Click **Save Changes** at the bottom of the page.

Result: your software can send this value with every check, and WISECP locks or shows it as you set.

### Replacing the verification key

1. In **Integration Details**, click **Replace Key** on the key card.
2. Read the warning in the window that opens and confirm.

Result: a new key pair replaces the old one. Copies you already sold carry the old key and stop verifying, so use this only if the private key leaked.

## Things to Watch

> **A locked parameter stays locked until the client releases it**
> 
> Once a value (an IP, a domain, a MAC address) is locked, a check with a different value fails. The client releases it from Client Area > Service Details before installing elsewhere.

> **No locked parameter means no restriction**
> 
> With no parameter set to Locked, a valid key gets an OK response from anywhere. Lock at least one parameter to tie the key to a single installation.

> **Replacing the key breaks copies you already sold**
> 
> Every copy carries the key it was built with. A new key makes those copies fail their checks until you ship an update. Replace the key only if the private key leaked.

> **Without a key nothing can be verified**
> 
> While the card reads Not Issued Yet, the `licence.php` file carries a placeholder that refuses every check. Issue the key before you hand the file to your software.

> **This tab is Software-only**
> 
> The Licensing tab only appears for products whose type is Software.

## Required Privileges

Viewing the product and this tab needs `PRODUCTS_LOOK` or `PRODUCTS_OPERATION`. Saving changes made here needs `PRODUCTS_OPERATION`.

## Related Articles

- [Product License Transfer](https://docs.wisecp.com/en/product-license-transfer)
- [Linked Services](https://docs.wisecp.com/en/linked-services)
- [Other Product Settings](https://docs.wisecp.com/en/other-product-settings)
