isTrialAllowed()


Method will verify if user with given email exist in database and purchased specified offer in the past (before restricted period).
Restricted period can be setup with offer - otherwise there is no time limitation and user can get trial only once per account.

Parameters:

Name Type Description
publisherToken string Your publisher token. To open enterprise account contact us
customerEmail string Customer's email address
offerId string Offer ID, e.g. S123123123_US

- required parameter

Response Parameters:

Name Type Description
trailAvailable boolean Information about user eligibility for trial period

Error Codes:

Code Description
3 Invalid publisher token
4 Invalid offer ID
10 Invalid user email

Request:

{
    "method": "isTrialAllowed",
    "params": {
        "publisherToken": "CybqkiTFp4gTKYvuBImBXzn86yMo8VY4fyZNdl-CfFhxGDw9",
        "customerEmail": "test@email.com",
        "offerId": "P770818221_FR"
    },
    "id": 1,
    "json-rpc": "2.0"
}

Response:

{
    "result": {
        "trialAvailable": true
    },
    "id": "1",
    "error": null,
    "jsonrpc": "2.0"
}

Remember! you can always check it by yourself using API Console - isTrialAllowed()

Back to Customer API