These docs are for v2.0. Click to read the latest docs for v2.1.

customCheckout()

customCheckout() is a part of SSO integration.

Parameters

NameTypeDescription
displayType*stringOptions available: popup / inline / overlay
containerIdstringOptional parameter (required for in-line checkout). ID of dom element in which checkout will be placed
customUrl*stringURL generated by prepareRemoteAuth() method. Notice: Link expires after 30 days or after first use
completed*functionGives detailed information about purchase made

* - required parameter

Usage

Example of popup checkout:

CleengApi.customCheckout({
    displayType: "popup",
    customUrl: "https:\/\/sandbox.cleeng.com\/auth\/2\/purchase?v=3&popup=1&remote_token=7a488355e48d593aac653ac2d5c25228a7b3fae8:5b3467ff73a414b067f7d4ef0b000cc707829412&redirectUri=https%3A%2F%2Fwww.example.com&offerId=S987654321_PL&publisherId=123456789",
    completed : function(result){}
});}

Example of inline checkout:

CleengApi.customCheckout({
    displayType: "inline",
    containerId: "my-container",
    customUrl: "https:\/\/sandbox.cleeng.com\/auth\/2\/purchase?v=3&popup=1&remote_token=7a488355e48d593aac653ac2d5c25228a7b3fae8:5b3467ff73a414b067f7d4ef0b000cc707829412&redirectUri=https%3A%2F%2Fwww.example.com&offerId=S987654321_PL&publisherId=123456789",
    completed : function(result){}
});

Example of overlay checkout:

CleengApi.customCheckout({
    displayType: "overlay",
    containerId: "my-container",
    customUrl: "https:\/\/sandbox.cleeng.com\/auth\/2\/purchase?v=3&popup=1&remote_token=7a488355e48d593aac653ac2d5c25228a7b3fae8:5b3467ff73a414b067f7d4ef0b000cc707829412&redirectUri=https%3A%2F%2Fwww.example.com&offerId=S987654321_PL&publisherId=123456789",
    completed : function(result){}
});