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

checkout()

The Cleeng Checkout is an out of the box module that takes care of user registration, payments, tax handling, discount coupons, social sharing and much more. It supports all the different types of business models, from single pay-per-view events to 'first-month-free' subscription models.

🚧

Info: The Javascript function as described here is for publishers who require a specific integration with the checkout.

Usage

Example of the Cleeng Checkout displayed as an overlay of the full web-page.

CleengApi.checkout({
        displayType: "overlay",
        offerId: "S123123123_US",
        completed : function(result){}
    });

Example of the Cleeng Checkout displayed inline inside the #my-container element. As there are 2 offers defined (offerId) in the checkout the customer has the option to select the preferred offer.

CleengApi.checkout({
        displayType: "inline",
        containerId: "my-container",
        offerId: "S123123123_US,S321321321_US",
        locale: "fr_FR"
        completed : function(result){}
    });

Parameters

NameTypeDescription
displayType*stringDefines how the checkout is loaded on the page, options: popup / inline / overlay
containerIdstringRequired for in-line checkout, otherwise ignored. Defines the id of the dom element on where the checkout will be loaded.
offerId*stringDefines the offer that will be purchased. You can add more offers by separating them with comma - "S123123123_US,S321321321_US"
transactionExternalDatastringOptional, information field that is passed along with the payment/transaction that appears in all reports. Useful for affiliate tracking, or to match your own identifier with the one from Cleeng.
localestringOptional, in the following format "en_US". It defines the language of the UI. If ommited it is automatically detected by Cleeng.
completed*functionHandler function that will get the information about the actual completion/payment (success or failure).

* - required parameter