Reselling extensions

How to resell extensions

This method applies to the scenario where you’d like to sell fresh Plesk instances together with a number of commercial extensions. This method also allows you to upsell extensions in your online store for already provisioned Plesk instances. Note that this method does not cover in-app purchase case. In other words, if your customers will click on “Buy Now” button in the extension catalog inside of Plesk, they will be taken to Plesk store, not your store.

Implementation details
  1. You need to have Plesk and the extensions you want to resell available as items in your online store.
  2. When a purchase is initiated, you need to contact KA via KA Partner API and request licenses for purchased items.
  3. KA will create the requested licenses and will send you a single activation code for these licenses. Note that KA has two versions of Partner API: v1 and v3.
    1. a. v1:
      1. https://central.plesk.com/docs/partner-api/1.0/
      2. Can request main Plesk key and multiple additional keys for extensions in a single call (see https://central.plesk.com/docs/partner-api/1.0/41090.htm).
      3. Single activation key for the main Plesk license and its additional license keys.
      4. Considered outdated, it’s recommended to use v3 instead.
    2. b. v3:
      1. https://central.plesk.com/docs/partner-api/3.0/
      2. Can request only one key (main or additional) in a single call (see https://central.plesk.com/docs/partner-api/3.0/63401.htm).
      3. Single activation key for the main Plesk license and its additional license keys (additional licenses requested in separate API calls are attached to the main l.icense and the same activation key for the main Plesk licenses will activate more licenses).
      4. Latest version of Partner API, recommended to use instead of v1.
  4. After your store receives the activation code, you can either give the code to the customer (via online store UI or e-mail), or, preferably, you can activate the licenses by running a CLI command on the Plesk instance you’ve created for the customer.

    Activation of licenses via CLI is done by using the “license” command. Usage details are available here: https://docs.plesk.com/en-US/17.0/cli-linux/using-command-line-utilities/license-license-keys.71029/

In-app upsell support

The method above does not cover in-app purchase case. In other words, if your customers will click on “Buy Now” button in the extension catalog inside of Plesk, they will be taken to Plesk store, not your store. To address this shortcoming, we’ve added the ability to provide your own store hostname in the panel.ini file. Once the store hostname is provided, all “Buy Now” links and other possible upsell links displayed inside the extensions will direct to your online store.

To change the URL of the online store used by the "Buy Now" links, edit the panel.ini file and add the following line to the [extensions] section:

[extensions]

buyUrl = "https://shop.com"

where "shop.com" is the domain name of your online store.

Here’s an example how it would work:

  • Original URL used by an extension:

https://go.plesk.com/buy-plesk-ext/extension-name?kn=PLESK.1234567890.0001

  • Modified URL used by an extension once you’ve specified your store’s hostname in panel.ini:

https://myownstore.com/store?extension-id=extension-name&kn=PLESK.1234567890.0001

Note: this feature will only affect those extensions which are sold by Plesk and use “go.plesk.com” as the destination hostname. If an extension is sold directly by an ISV, its “Buy Now” links and other possible upsell links will not be affected.

How to control which extensions you want to show and sell

Once you’ve changed the URL for the “Buy Now” links (as explained above), all commercial extensions, including those that will be added to the Extension Catalog in the future, will lead to your store, even if you haven’t set them up yet. You can make sure that your customers will only see the commercial extensions that you are ready to sell by configuring a smart proxy server for the Plesk Extension Catalog. This proxy server will take the Extension Catalog feed, filter out the extensions that you are not ready to sell, and provide the modified feed to your Plesk instances.

Implementation details

  1. Set up a server (physical or virtual) where the proxy script will be running.
  2. Take the proxy script from https://github.com/plesk/extensions-catalog-proxy and put it on the server. This link contains the instructions that will help you understand how the proxy script works and how it should be deployed.
  3. Configure the proxy to pass through only those commercial extensions that should be visible on your Plesk servers.

    The proxy works as a whitelist ? you need to specify the IDs for the commercial extensions that should be displayed in Plesk, everything else won’t be visible. You can find the list of extensions and their IDs (“codes”) here: https://ext.plesk.com/api/v4/packages

    Important note: the proxy only affects the extensions that have “Buy Now” links pointing to https://go.plesk.com. Free extensions and the extensions that have “Buy Now” buttons going elsewhere are not covered by the proxy ? they will continue to be visible in the Extension Catalog on your Plesk servers.

  4. Change the URL of the extension catalog feed on all your Plesk servers so that it is pointing to the proxy server address. This is done by adding the following line to panel.ini:

    [extensions]

    catalog.url = http://<proxy-address>:8080

  5. When a new commercial extension becomes available in the Extension Catalog and you’ve set up your store to sell it, modify the proxy by adding the corresponding extension ID so that this extension is passed through and is available to your customers. Note that the catalog feed is cached on Plesk servers and new extensions will not appear immediately.
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.