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
Name | Type | Description |
---|---|---|
publisherToken* | string | Your publisher Token. Only for enterprise accounts. |
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 |
Parameters
Name | Type | Description |
---|---|---|
url | string | URL 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
Code | Description |
---|---|
3 | Invalid publisher token |
5 | Access denied |
10 | Invalid email address |
11 | Invalid arguments |