Hyperz Documentation > Products > Payment System > Licensing

Licensing

Hyperz

Product Licensing

This guide will show you how to integrate your own product licensing into your products to work alongside Payment System to prevent your hard work from being stolen, copied, or resold anywhere on other platforms!

Table of Contents


API Calls Documentation

This guide will show you the basics of making an HTTP request to your Payment System API to authorize your products license!

// Import Axios
const axios = require('axios');

// Data for checking licenses
let licenseKey = 'YOUR_LICENSE_KEY_HERE'; // Your owned item license key goes here
let uniqueId = "YOUR_PRODUCT_UNIQUE_ID"; // The Unique Id of a product from the product management page
licenseCheck(licenseKey, uniqueId);

async function licenseCheck(licenseKey, uniqueId) {
    // Initial Check
    let request = await axios({
        method: 'get', // GET Request
        url: `https://store.hyperz.net/api/v1/license/check/${licenseKey}`, // Your domain with your license key at the end
        headers: {Accept: 'application/json, text/plain, */*','User-Agent': '*', 'productid': uniqueId } // Product's Unique Id
    });

    if(request.data.authorized) { // If Authorization is accepted
        console.log('License Key Accepted');
    } else { // If authorization has failed
        console.log('License Key Failed');
        process.exit(1) // Terminate the NodeJS Application
    };
};

Encryption W/Obfuscation

Adding a license system to your product like shown above seems pretty easy right? Well, that also makes it pretty easy to remove. There are a few different ways to help change that. This way is going to do it by introducing the art of Obfuscation. In this case we will use an online JavaScript Obfuscation tool.

What is it?
Obfuscation essentially takes all of the JS code within a file and puts it on 1 line, while also changing all of the variables and their calling points in the file to random strings of text.

👍 Pros 👎 Cons
This makes it very difficult to read and nearly impossible to edit. It cannot be reverted, so you have to remember to keep a backup.
It is a common practice used in many developer's products. It slows down the speed of your code significantly.

How do I use it?
After integrating the code from the example into your JS file, all you have to do is copy everything within your JS file and place it into an obfuscator.

Here are the methods we suggest:

  • CodeLocker - A state of the art production based JS Obfuscation tool.
  • Obfuscator.io - A free but easily cracked obfuscation tool.

Encryption W/Verbatim

You can purchase the Verbatim encryption tool here.

What is it?
Verbatim basically just turns your JavaScript code into straight symbols and unrecognized characters. This makes it physically impossible in any way/shape/form to change the code, read the code, or really even look at the code at all. It is what Payment System is encrypted with and so far has never been cracked before.

verbatim code comparison

Nerdy Stuff:
This program is a tool that compiles NodeJS code and files to a specific language that can then be interpreted by the Verbatim NPM module (here). This allows developers to further in-depth encrypt their code, license systems, credits, and more stopping users from coming in and removing and ripping their services and software.

Verbatim is a Latin term that stands for "in exactly the same words as were used originally".

Please note: This program WILL NOT DECRYPT OR DECOMPILE files. This is strictly for compiling and encrypting. It's 100 levels above JavaScript obfuscation and it isn't even very slow! You may be able to run other encrypted files with this tool, however no guarantees are made.

👍 Pros 👎 Cons
Permanent encryption with no chances of breach or cracking. Paid application from Hyperz Development.
Supports custom file extensions. Requires extended JavaScript knowledge.

Was this article helpful?

14 out of 22 found this helpful