generateCheckoutUrl()


Generates link to checkout box. Through the optional parameters offerId and redirectUri you can customize it - for instance, redirect customer to your page or sell particular offer.

Info: Enterprise account required. Contact us if you're interested about opening Enterprise account.

Note: Link generated by prepareRemoteAuth() expires after 30 days or after first use.

Parameters:

Name Type Description
publisherToken string Your publisher token. To open enterprise account contact us
customerEmail string Customer's email
flowDescription object
-offerId string ID of the broadcaster's offer, e.g. A123123123_US
-redirectUri string URI to your content

- required parameter

Response Parameters:

Name Type Description
url string URL to checkout

Error Codes:

Code Description
3 Invalid publisher token
5 Access denied
10 Invalid email address
11 Invalid arguments

Request:

[
    {
        "method": "generateCheckoutUrl",
        "params": {
            "publisherToken": "Hhk32h5dNpIuTqdzJP1DYia-iOVVzBq6I6xWNzPgOiIszcig",
            "customerEmail": "some-customer@email.com",
            "flowDescription": {
                "offerId": "R123123123_US",
                "redirectUri": "http:\/\/your-website.com\/uri"
            }
        },
        "jsonrpc": "2.0",
        "id": 1
    }
]

Response:

[
    {
        "result": {
            "url": "https:\/\/cleeng.com\/auth\/2\/purchase?v=3&popup=1&remote_token=ee02396409be7e528196bc9d5a3892ef645308b4:088e53a140b8f5d263fa3da0c7e117031f6aa053&redirectUri=https%3A%2F%2Fcleeng.com%2Fjs-api%2F3.0%2Fdefault-channel.html&offerId=R123123123_US&publisherId=465555558"
        },
        "id": "1",
        "jsonrpc": "2.0"
    }
]

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

Back to Customer API


We use cookies to ensure that we provide you the best service and website experience. Read our Cookie policy for more details.