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.
- You need to have Plesk and the extensions you want to resell available as items in your online store.
- When a purchase is initiated, you need to contact KA via KA Partner API and request licenses for purchased items.
- 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.
- a. v1:
- 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).
- Single activation key for the main Plesk license and its additional license keys.
- Considered outdated, it’s recommended to use v3 instead.
- b. v3:
- Can request only one key (main or additional) in a single call (see https://central.plesk.com/docs/partner-api/3.0/63401.htm).
- 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).
- Latest version of Partner API, recommended to use instead of v1.
- a. v1:
- 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
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:
- Modified URL used by an extension once you’ve specified your store’s hostname in
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.
- Set up a server (physical or virtual) where the proxy script will be running.
- 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.
- 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.
- 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
catalog.url = http://<proxy-address>:8080
- 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.