generateCheckoutUrl

❗️

Deprecated

JSON-RPC generateCheckoutUrl method is deprecated.

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.

🚧

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

Parameters

NameTypeDescription
publisherToken* stringYour publisher Token. Only for enterprise accounts.
customerEmail*stringCustomer's email
flowDescriptionobject
-offerIdstringID of the broadcaster's offer, e.g. A123123123_US
-redirectUristringURI to your content

Parameters

NameTypeDescription
urlstringURL to checkout

API Request/Response

Request

{
  "method":"generateCheckoutUrl",
  "params":{
    "publisherToken":"Hhk32h5dNpIuTqdzJP1DYia-iOVVzBq6I6xWNzPgOiIszcig",
    "customerEmail":"[email protected]",
    "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"
 }

Error Codes

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