Difference between revisions of "Softsale"

From aMember Pro Documentation
Jump to: navigation, search
(Check-License)
Line 72: Line 72:
 
:license key entered by customer
 
:license key entered by customer
  
 +
'''Positive Response (returned in JSON format)'''
 
{| border="1" cellspacing="0" cellpadding=3
 
{| border="1" cellspacing="0" cellpadding=3
|+ Positive Response (will be returned in JSON format)'''
 
 
| code
 
| code
 
| ok
 
| ok
Line 94: Line 94:
  
  
{|
+
'''Negative Response (returned in JSON format)'''
|+ '''Negative Response (will be returned in JSON format)'''
+
{| border="1" cellspacing="0" cellpadding=3
 +
|code
 +
|described below in [#HTTP API Error Codes]
 +
|-
 +
|message
 +
|corresponds to the error code
 +
|-
 +
|next_check
 +
|seconds to check license next time (if necessary for your licensing/activation logic)
 +
|}
 +
 
 +
== Activate License ==
 +
 
 +
'''URL''' ''http://www.example.com/amember/softsale/api/activate''
 +
 
 +
'''Positive Response (returned in JSON format)'''
 +
{| border="1" cellspacing="0" cellpadding=3
 +
| code
 +
| ok
 +
|-
 +
| message
 +
| OK
 +
|-
 +
| scheme_id
 +
| Licensing scheme#
 +
|-
 +
| scheme_title
 +
| Licensing scheme title
 +
|-
 +
| license_expires
 +
| license expiration in ''yyyy-mm-dd hh:ii:ss'' format
 +
|-
 +
| next_check
 +
| seconds to check license next time (if necessary for your licensing/activation logic)
 +
|}
 +
 
 +
 
 +
'''Negative Response (returned in JSON format)'''
 +
{| border="1" cellspacing="0" cellpadding=3
 
|code
 
|code
 
|described below in [#HTTP API Error Codes]
 
|described below in [#HTTP API Error Codes]

Revision as of 12:50, 24 March 2014

SoftSale module adds ability to automatically assign license keys and serials to customer orders, supports online activations and "call-home" functionality for your applications (including Android and IOS apps) and scripts. Flexible API allows to build subscription-based software applications. Watch a [Demo Video] about the module.

Contents

Features of SoftSale Module

  • Allows to generate random license keys
  • Allows to use license keys from pre-defined list
  • Allows to create your own 'plugin' and define your own algorithm of keys generation. In time of key generation full customer and order information is available.
  • Allows to issue more than one license keys for purchase
  • Handles license activations (tied to domain, url, server IP or hardware ID - calculated by your software)
  • You may limit number of re-activations
  • Supports call-home functionality to ensure customer subscription is still active and not refunded/charged-back
  • Provides protected and versioned downloads section in member area (you may offer more than 1 version of software for download + changelog)

How to enable SoftSale Module?

Go to aMember CP -> Setup -> Plugins, in Modules section choose softsale and then click Save button.

How to configure SoftSale Module?

New-license-scheme.png

Go to aMember CP -> SoftSale -> License Schemes and click New Record button.

You will see a form with License Scheme settings.

A license scheme defines a type of license keys that will be issued to customers.

You may assign License Scheme to one or several aMember products - once user purchases such a product in aMember, licenses will be automatically generated.

Title
That how such license scheme will be named
Comment
For your internal reference
Disabled
In this case scheme will not issue new keys
Products
Define aMember products list that will issue such licenses if purchased
Licensing Method
There is currently only one choice : standard. Plugins may define new methods that may change entire logic of license handling.
Key Generator
Define method of license key generation. By default there are 2 choices: predefined-keys and random. Softsale plugins may add new methods.
Generated License Valid To
You may set license to expire with user subscription or to be lifetime
E-Mail Generated License to Custgomer
After saving new license scheme you may return back via edit form and modify standard e-mail message that will deliver license keys to customer
Activation
Here you can enable standard activation algorithms or keep No activation to use plugin just for license key generation. Softsale plugins may add new activation methods
License Keys
In case if you choose predefined keys as key generation method, please copy/paste list of keys (each on new line) into this textarea

Where can I see generated licenses?

After you have configured license schemes, and new order will generate license keys. You may find list of all issued licenses at aMember CP -> SoftSale -> Licenses You will see activations and other relevant information about license keys.

How can I setup software downloads for my customers

Go to aMember CP -> Softsale -> Software Downloads, create new software title, and upload new version. It will be available in member area if user has necessary subscription to products.

How can I integrate license and activation checks into my software?

We have created a sample PHP script that shows how to use softsale integration in real app. Please take a look to [open GitHub repository].

HTTP API Description

In PHP applications we recommend to use the softsale-sample-app as we described above. To use Softsale from applications in other programming languages, you may use HTTP API directly to check/activate and de-activate license keys.

How to access the HTTP API

To access API, you need to make HTTP POST call to URL http://www.example.com/amember/softsale/api/ACTION (replace www.example.com/amember with path to your aMember installation and ACTION to the API method) Required parameter for all calls is ``key`` - license key entered by customers (and stored in your software settings locally).

Check-License

URL http://www.example.com/amember/softsale/api/check-license Input Parameters:

key
license key entered by customer

Positive Response (returned in JSON format)

code ok
message OK
scheme_id Licensing scheme#
scheme_title Licensing scheme title
license_expires license expiration in yyyy-mm-dd hh:ii:ss format
next_check seconds to check license next time (if necessary for your licensing/activation logic)


Negative Response (returned in JSON format)

code described below in [#HTTP API Error Codes]
message corresponds to the error code
next_check seconds to check license next time (if necessary for your licensing/activation logic)

Activate License

URL http://www.example.com/amember/softsale/api/activate

Positive Response (returned in JSON format)

code ok
message OK
scheme_id Licensing scheme#
scheme_title Licensing scheme title
license_expires license expiration in yyyy-mm-dd hh:ii:ss format
next_check seconds to check license next time (if necessary for your licensing/activation logic)


Negative Response (returned in JSON format)

code described below in [#HTTP API Error Codes]
message corresponds to the error code
next_check seconds to check license next time (if necessary for your licensing/activation logic)