License Key Upgrades

As a client, you can provide software license key upgrades at discounted prices. You can choose to authenticate customers’ credentials for these offers.

There are different ways to authenticate customer credentials before granting access to a purchase at a discounted price. The most common method is to send the customers an email with an upgrade purchase link.

An alternative method uses an API to validate the customer’s eligibility for the upgrade purchase. There are three steps in the API method:

Step 1: Set Up License Key Upgrades in Commerce Assistant

  1. In Commerce Assistant, in the Setup menu, select Account Setup.
  2. Click the Upgrade Management section to set up your upgrade information. This section is used to configure the API settings used for validating a customer's eligibility for software license key upgrades.
  3. Enter the following settings:
Enable upgrade managementSelect to enable license key upgrade management.
URLEnter the URL you prepared on your web server.
UsernameEnter the username you set up to control access to the account.
PasswordEnter the password you set up to control access to the account.
XML schemaSelect either a specific XML schema or to always use the most current version. Selecting the Use Current Version option always sends the documents in the most current version. However, this may cause compatibility issues if a fundamental change is made to the structure.
Accept previous license when server is downSelect to accept previous license keys even when your web server is down.

Step 2: Checkout Process for License Key Upgrades

When the API is configured, the customer is asked to provide the existing license key next to the respective item in the shopping cart.

You decide which products will require customers to enter previous license keys. Contact Client Experience to set up this option.

The customer is prevented from continuing the order process until a valid license key is provided.

Step 3: Validation of License Key Upgrades

The license key for the upgrade must be validated by your web server:

Validation Call

The customer submits the previous license key for validation to your web server.

Cleverbridge sends an HTTP POST request for an XML document to the URL you defined.

The XML document submitted in the POST follows an XSD definition available at:



This link may be different depending on which XML schema you use.

The following shows a sample XML document according to this definition:

<?xml version="1.0" encoding="utf-8"?>
<cbn:ValidatePreviousLicenseCartItemRequest xmlns:cbn="">
  <cbn:CustomerInformation cbt:Id="NEW" xmlns:cbt="">
  <cbn:Item cbt:RunningNo="1" xmlns:cbt="">
    <cbt:ProductName>The Product Name</cbt:ProductName>
    <cbt:ProductReportingGroup>Example Product Group</cbt:ProductReportingGroup>

Validation Response

Your license validation server must respond with an HTTP status of 200 (OK) regardless if the entered key is valid or not. Any other HTTP status is treated as an error and causes the validation process to fail.

The response must be formatted as described in the following URL:




This link may be different depending on which XML schema you use.

The following is a sample of a formatted response:

<?xml version="1.0" encoding="UTF-8"?>
<cbn:ValidatePreviousLicenseCartItemResponse xmlns:cbn="">

The following are responses showing various return values:

  • All OK
<?xml version="1.0" encoding="UTF-8"?>
<cbn:ValidatePreviousLicenseCartItemResponse xmlns:cbn="">
  • Key Expired
<?xml version="1.0" encoding="UTF-8"?>
<cbn:ValidatePreviousLicenseCartItemResponse xmlns:cbn="">
  • Custom Error Message
<?xml version="1.0" encoding="UTF-8"?>
<cbn:ValidatePreviousLicenseCartItemResponse xmlns:cbn="">
  <cbn:Text>Custom Error Text</cbn:Text>

When validating keys, Cleverbridge waits up to 10 seconds before it considers the validation attempt failed. The validation is also considered to have failed if the server responds with an HTTP status other than 200 or if the returned XML document is invalid.

Cleverbridge can configure what happens in case of a failed validation attempt. For example, Cleverbridge can accept the upgrade or reject it.

Cleverbridge tries to minimize the number of calls to the validation servers. An additional call is not made when the license quantity is changed for a cart item that has previously been validated. For that reason you are requested to always return the minimum and maximum number of upgrade licenses that can be purchased based on a validated key.

Once the license key is successfully validated, the customer is able to continue.



Cleverbridge does not encourage you to use this process unless it is considered absolutely necessary. Requiring a customer to enter a previous key during the order process is an additional hurdle for the customer in order to submit the upgrade order. This can have a negative impact on conversion rates and decrease overall revenue.

Sample Code for License Key Upgrades

There are two pieces of sample code that Cleverbridge can provide. You can extend them to make them work with your license database.