# Software licensing

With hostware, you can easily sell software products and add paid licensing to them. For that, enable the HwLicensing module in the module list.

## Enable licensing feature

The licensing feature is hidden by default. To enable the feature, append the following string to your .env file in /var/www/hostware:

```
HOSTWARE_ENABLE_SOFTWARE_PRODUCTS=true
```

Reload the cache:

```
cd /var/www/hostware && php artisan optimize
```

After that, you can enable the licensing module.

## Manage software packages

In the administration sidebar you can find the new "Software" menu entry. Here you can manage one or multiple software packages. Each package can have multiple versions with a proper changelog and download link.&#x20;

Also, each version can contain an encrypted as well as an open source version.

## Configure software product

During product creation, you can now select the "SOFTWARE" type. Select the "HwLicensing" module for the provisioning as usual.&#x20;

<figure><img src="/files/dmGlKd05T6GCbPV6HHME" alt=""><figcaption></figcaption></figure>

At the tab "Software" you can then select the desired software package which should be available for this product.

## API for validation

hostware offers a REST API endpoint to validate the validity of a given license.

### Validate (JSON)

<mark style="color:green;">`POST`</mark> `/api/v1/license/{licenseKey}/verify`

Replace the licensekey in the URL.

**Headers**

| Name   | Value              |
| ------ | ------------------ |
| Accept | `application/json` |

**Response**

{% tabs %}
{% tab title="Successful" %}
hostware returns structured information regarding the hosting, the product options and the customer itself.

```json
{
    "license": {
        "product_hosting_number": "VN-11605",
        "module_name": "HwLicensing",
        "status": "ACTIVE",
        "product_options": {
            "204": {
                "id": 204,
                "label": "250 Kunden-Accounts",
                "value": 250
            }
        },
        "created_at": "2026-05-06T20:14:49.000000Z"
    },
    "product": "keyhelp-whmcs-modul-leased",
    "product_data": {
        "id": 1133,
        "name": "Keyhelp WHMCS Modul",
        "description": "-"
    },
    "customer": "hostware GmbH",
    "company": "hostware GmbH",
    "full_name": "Max Mustermann",
    "email": "max@mustermann.de",
    "service_data": {
        "renew_next": "2026-05-09T20:20:46.000000Z",
        "renew_last": "2026-05-06T20:20:46.000000Z",
        "period_name": "Monatlich",
        "period_price": 50,
        "monthly_price": 50
    }
}
```

{% endtab %}

{% tab title="On error case" %}
hostware returns the property "error" with the message.

```json
{
    "error": "License not found"
}
```

```json
{
    "error": "License is not active (installing)"
}
```

{% endtab %}
{% endtabs %}

### Validate (WHMCS Style)

Our customers can easily migrate from WHMCS to hostware. The local license verification code does not need to be adjusted, you just have to change the url. hostware will return the data 1:1 the same style as WHMCS so your integration does not break.

<mark style="color:green;">`POST`</mark> `/api/v1/license/whmcs-verify`&#x20;

**Body**

| Name         | Description    |
| ------------ | -------------- |
| `licensekey` | The licensekey |

**Response**

{% tabs %}
{% tab title="Successful" %}
hostware will return the same structure used by the WHMCS verification endpoint. That way, existing integrations wont break.

```xml
<status>Active</status>
<registeredname>Max Mustermann</registeredname>
<companyname>hostware GmbH</companyname>
<email>max@mustermann.de</email>
<serviceid>VN-11605</serviceid>
<productid>1133</productid>
<productname>Keyhelp WHMCS Modul</productname>
<regdate>2026-05-06T20:14:49.000000Z</regdate>
<nextduedate>2026-05-09T20:20:46.000000Z</nextduedate>
<billingcycle>Monatlich</billingcycle>
<validdomain>-</validdomain>
<validip>-</validip>
<validdirectory></validdirectory>
<configoptions>Amount of accounts=250</configoptions>
<customfields></customfields>
<addons></addons>
<md5hash></md5hash>
```

{% endtab %}
{% endtabs %}


---

# 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://docs.hostware.io/modules/hosting-provisioning/software-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.
