CleengApi.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.

If you are not familiar with the Cleeng Checkout, start with reading the Modules overview.

For default usage of the checkout it's recommended to use the embeddable html version of the checkout.
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 prefered offer.

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

Parameters:

Name Type Description
displayType stringDefines how the checkout is loaded on the page, options: popup / inline / overlay
containerId stringRequired 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"
transactionExternalData stringOptional, 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.
locale stringOptional, 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


Back to Authorization & payments


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