The Sellwire Blog

New Feature: Licensing

Today we are announcing an awesome new feature for Sellwire – Licensing for your files!

We have been working hard to get this out so you can now sell your files integrated with Sellwire’s complete license key generation, activation, and renewal system. This makes Sellwire an even more powerful tool for selling your digital files. It is especially geared towards premium WordPress themes and plugins but can be used with any software that requires activation of a license.

Key features

  • Files can be license enabled
  • License key generation for orders of those files (license key and details added to the receipt)
  • License key activation, deactivation and checking via Sellwire’s API
  • Ability to limit the activation of the license per file and per file price variation
  • License expiry functionality so licenses need to be renewed after expiry
  • License renewal discount percentage and control over length of discount availability
  • Automated email expiry reminders
  • Full logs of the license activity and history

Setup

So let’s get started! You will now see in the settings screen a new section for licensing –

File Licensing Settings

Here you can control some defaults for your files that will be licensed. Once you have checked ‘Enable Licensing’, configured your settings and saved them you will see a new menu option after ‘Orders’ for the licenses.

If you then go to add a new file, or edit an existing one you will now see a checkbox to enable licensing for that specific file.

Screen Shot 2013-11-15 at 12.57.22

Here you can override the default licensing expiry or leave it as it and set a license activation limit. If your file has price variations enabled you will be able to set a limit per variation.

Screen Shot 2013-11-15 at 13.01.31

Now once someone purchases that file, a license gets created for that order –

Screen Shot 2013-11-15 at 13.04.44

You have full control over that license after it has been generated. It can be disabled, the activation limit can be edited and it’s expiry changed.

The customers receipt now contains important information about the license, including the key to to activate in your software:

Screen Shot 2013-11-15 at 13.10.41

And once it is has expired the receipt is where they can renew the license:

Screen Shot 2013-11-15 at 13.12.40

Automated emails are sent once to customers when a license expires in 14 days, and once when it has expired with a link to the receipt so they can easily renew.

Sellwire API

The license system relies on the new Sellwire API. You will now see a new setting section below the file licensing with your Sellwire API key. At the moment the API’s endpoints are limited and we are working on expanding them and adding some proper documentation around it.

The API endpoints for the licensing are activate_license, deactivate_license and check_license. check_license is the only endpoint that requires you pass your Sellwire API key as the X-API-KEY header. All endpoints are only accessible via https and are located at:

https://app.sellwire.net/api/1/[endpoint]

Activate License

GET – /activate_license
Parameters:

  • license – The license key entered by the customer and stored in your software
  • file – the file id found in the edit file screen in Sellwire

https://app.sellwire.net/api/1/activate_license?license=9e5a17387612a3770554cd6f617a59d53d4adad3&file=XXX

Successful response:
{ "license": "activated" }

Unsuccessful responses:
{ "error": "License to be provided" }
{ "error": "File Id needs to be provided" }
{ "error": "File could not be found" }
{ "error": "Licensing not activated" }
{ "error": "License could not be found" }
{ "error": "License disabled" }
{ "error": "License expired" }
{ "error": "License activation limit reached" }

Deactivate License

GET – /deactivate_license
Parameters:

  • license – The license key entered by the customer and stored in your software
  • file – the file id found in the edit file screen in Sellwire

https://app.sellwire.net/api/1/deactivate_license?license=9e5a17387612a3770554cd6f617a59d53d4adad3&file=XXX

Successful response:
{ "license": "deactivated" }

Unsuccessful responses:
{ "error": "License to be provided" }
{ "error": "File Id needs to be provided" }
{ "error": "File could not be found" }
{ "error": "Licensing not activated" }
{ "error": "License could not be found" }
{ "error": "License disabled" }
{ "error": "License expired" }

Check License

GET – /check_license
Parameters:

  • license – The license key entered by the customer and stored in your software
  • file – the file id found in the edit file screen in Sellwire

https://app.sellwire.net/api/1/check_license?license=9e5a17387612a3770554cd6f617a59d53d4adad3&file=XXX

Successful response:
{ "license": "valid" }

Unsuccessful responses:
{ "error": "License to be provided" }
{ "error": "File Id needs to be provided" }
{ "error": "File could not be found" }
{ "error": "Licensing not activated" }
{ "error": "License could not be found" }
{ "error": "License disabled" }
{ "error": "License expired" }

WP Updates Integration

If you use WP Updates to manage the automatic updates of your themes and plugins, and you want to allow updates for only valid licenses, you can now integrate it with Sellwire’s license system. Check out this WP Updates blog post for more information.

8 Comments

  1. Ok, and how do we integrate your license keys with our wordpress themes? Is there a snippet, template, or working demo anywhere?

  2. Derek says:

    Get License doesn’t work. {“status”:false,”error”:”Invalid API Key.”}

  3. Same problem here, getting:
    {
    “status”: false,
    “error”: “Invalid API Key.”
    }

    Are there any other API methods available as well?

  4. Howard says:

    seems not working

    getting:
    {
    “status”: false,
    “error”: “Invalid API Key.”
    }

  5. Howard says:

    check_license endpoint

Leave a Reply

Your email address will not be published. Required fields are marked *