1. Home
  2. License Systems

License Systems

License key delivery options

If you sell software, you may want to secure your product with a license key. Digistore24 can deliver a license key together with your product.

To deliver a license key with the product, edit the product and select in the "Deliver tab" one of the following three options in the box ‘deliver the license key’.

1. Types of license keys: generated by Digistore24

Digistore24 creates license keys. The license key is random and unique (i.e. two different orders are guaranteed to have different license keys).

Advantages and disadvantages

You don’t have to generate the license keys yourself. Digistore24 ensures that the keys are unique (among all license keys that are delivered by Digistore24).

However, your system must receive the key from Digistore24 (when calling the thank you page or through an IPN notification) and store it in your database. Your software must then be able to verify the key with your database.

2. Types of license keys: your license server

You set up a URL, through which Digistore24 requests the license key. A HTTP request is then carried out for every order.

An example script in PHP for every license server can be found here.

Advantages and disadvantages

You can program (or get your license server programed) so that it integrates customer data into the key. For example, the customer could enter their name and key into your software. The software is only unlocked when both details match.

Since a HTTP request is carried out for every order, it is important to ensure that your server is always reachable and that you haven’t installed any security plugins that could interfere with the request.

3. License key types: Key lists

Go to Settings > License keys in Digistore24, and provide a list of license keys

You can fill out the list by copy and paste or enter a URL. Digistore24 then reads the license keys from the URL. An example script in PHP for a bulk license server can be found here.

With this method, you must always ensure that you fill out the key list on Digistore24. Otherwise, no further license keys will be delivered.

Requirements for a license key:

Saving the license key in your database

With all three types of license key, the license key is delivered to the thank you page and IPN notifications as the parameter “license_key”.

This applies for all three types of license generation:

They are forwarded to the target system via an IPN.

This is especially important for license keys generated by Digistore24 as the key may otherwise not be recognized.

How do your customers get the license key?

The license keys are delivered via email together with the order confirmation. In addition, they are also displayed on the confirmation page.

Checking license keys

You can check the license keys online via the Digistore-API-Function validateLicenseKey.

License server for license key lists

Upload a list of license keys to Digistore24 under Settings>License keys.
If necessary, Digistore24 can automatically fill out the lists.
Here is an example script.

License server for single licenses

Digistore24 obtains a license from the vendor’s license server for every purchase.

The license key can be generated from the buyer’s data (name, address) and the order number, for example.

Here is an example script.

Which data is transferred?

Digistore24 calls up the license server’s URL and transfers the order data via POST:

  • order_id – the order Id, e.g. A1B2C3D4
  • email
  • product_name
  • product_id
  • quantity – the number of order products – usually: 1
  • api_mode – ‚live‘ or ‚test‘ (for test orders)
  • address_first_name
  • address_last_name
  • address_street
  • address_city
  • address_state
  • address_zipcode
  • address_phone_no

What data does Digistore24 expect?

Digistore24 expects a JSON encoded data set with the license data:

status   => 'success'
key        =>  ​LICENSEKEY
data      => ​LICENSEDATA
LICENSEDATA is a data set with any key-value pairs, e.g.:array(
name => 'Matthew Smith'
order_id => 'A1B2C3D4

An example implementation in PHP can be found under the URL download above.

What data does the user expect?

The data record with the license data, please refer to the example script.

License keys generated by Digistore24

Digistore24 generates a random and unique license key. This means that Digistore24 delivers each key online only once – nobody else will receive the same key.
This is only recommended if you receive the key via an IPN on your own server, otherwise you don’t know if the key is valid.

Show customer login details in Digistore24 reports

1. Download the sample license server script

Click on: https://www.Digistore24.com/download/licensekey/examples/licensekey/singlekeygenerator.php

2. Insert your thank you page key at the start of the script

define( 'THANKYOU_PAGE_KEY', 'Your-thank-you-page-key);

You can find your thank you page key under Account>Details on our ‘Thank you page settings’ page

3. Ensure the script receives the username and password from your system 

You can, for example, use an email address as the login name

These characters are permitted: a-z A-Z 0-9 – + # _ , . ; / ( ) $ % & < >

4. Transfer the data to Digistore24

Assuming the login name is USERNAME and that the password is PASSWORD, make sure the script returns the following at the end:

$response = array(
'status' => 'success',
'key' => 'Loginname:USERNAME|Kennwort:PASSWORD',
'data' => array(),
'headline' => 'Your Login Details',
'show_on' => array( 'receipt_page', 'order_confirmation_email' ),
digistore_exit( $response );

You can change ‘Loginname’, ‘Password’ and ‘Your Login Details’.

To display the login details additionally on the invoice, comment out (or delete) this line:

 'show_on' => array( 'receipt_page', 'order_confirmation_email' ),

5. Install the script on your server

Take a note of the script’s URL.

6. Edit your product

Under the heading deliver the license key, enter:

Type of license key: Your license server

License server URL: The URL from step 5)

If you now carry out a test payment, the login data will be displayed under the heading ‘Your login details’.

Updated on 24. January 2019

Was this article helpful?