Skip to main content

InLine Checkout ordering engine

InLine Checkout ordering engine

Last updated: 29-Feb-2024
Rate this article:

Overview

InLine Checkout acts as an iframe that opens on your website, enabling you to receive payments without redirecting your customers to a third party checkout.

Integrate InLine Checkout and:

  • Offer your customers the possibility of purchasing using mobile devices with a responsive cart design, which renders well on a variety of devices and screen sizes.
  • Improve your localization strategy, with a cart translated into 29 languages, and +130 transactional currencies for displaying the price.
  • Minimize the customer effort during the purchase by passing the collected billing/shipping information to InLine Checkout.

InLine Checkout integrates ideally with shopping cart applications that collect customer billing and shipping information, allowing you to pass that information over to the cart and minimize customer's efforts during the payment process.

 

However, you can easily switch to a Multi-Step InLine Checkout flow if some of your customers would rather stick to a step-by-step payment process and fill-in their order details on separate cart pages.

inline checkout.jpg

Availability

InLine Checkout is available for accounts that have ConvertPlus enabled on their account. Contact 2Checkout for activation.

Features

We are continuously working on improving the InLine Checkout experience. Read here the full list of features supported by the InLine Checkout.

Dynamic product information

InLine Checkout enables you to receive payments without having products defined in your 2Checkout Control Panel. Send the product information dynamically to InLine Checkout, and receive payments without the need for a product catalog in 2Checkout.

How to integrate InLine Checkout

To integrate InLine Checkout with your shopping cart, follow the steps below.

1. Generate and insert the JavaScript code in your eCommerce website by following these steps:

  • Go to Setup Generate links area
  • Click the InLine Checkout tab.
  • Copy the JavaScript code snippet generated by our platform (see the code sample below) and paste it into your eCommerce website (you can paste it either inside the <head> tag or inside the page body right before the closing </body> tag of your HTML page)

You can choose one of the scripts below according to your preferred cart-flow length:

One-Step InLine:

<script> 

    (function (document, src, libName, config) { 

        var script             = document.createElement('script'); 

        script.src             = src; 

        script.async           = true; 

        var firstScriptElement = document.getElementsByTagName('script')[0]; 

        script.onload          = function () { 

            for (var namespace in config) { 

                if (config.hasOwnProperty(namespace)) { 

                    window[libName].setup.setConfig(namespace, config[namespace]); 

                } 

            } 

            window[libName].register(); 

        }; 


        firstScriptElement.parentNode.insertBefore(script, firstScriptElement); 

    })(document, 'https://secure.2checkout.com/checkout/client/twoCoInlineCart.js', 'TwoCoInlineCart',{"app":{"merchant":"XXXXXX","iframeLoad":"checkout"},"cart":{"host":"https:\/\/secure.2checkout.com","customization":"inline-one-step"}}); 

</script> 

Multi-Step InLine:

<script> 

    (function (document, src, libName, config) { 

        var script             = document.createElement('script'); 

        script.src             = src; 

        script.async           = true; 

        var firstScriptElement = document.getElementsByTagName('script')[0]; 

        script.onload          = function () { 

            for (var namespace in config) { 

                if (config.hasOwnProperty(namespace)) { 

                    window[libName].setup.setConfig(namespace, config[namespace]); 

                } 

            } 

            window[libName].register(); 

        }; 

        firstScriptElement.parentNode.insertBefore(script, firstScriptElement); 

    })(document, 'https://secure.2checkout.com/checkout/client/twoCoInlineCart.js', 'TwoCoInlineCart',{"app":{"merchant":"XXXXXX","iframeLoad":"checkout"},"cart":{"host":"https:\/\/secure.2checkout.com","customization":"inline"}}); 

</script> 

Your merchant code (you can find it in your merchant Control Panel, Dashboard → Integrations → Webhooks and API → API section) is automatically added by the system when you generate the JavaScript code library shown above, in the XXXXXXX string.

After you integrate the InLine Checkout JavaScript code in your HTML page, you get access to the library that allows you to add products, control billing and shipping details, and start the checkout process (see the JavaScript API reference here).

2. Add a buy button on your website.

  • Navigate to the merchant Control Panel → Setup → Generate links
  • Click on the InLine Checkout tab
  • Select a product from the drop-down list in the 'Select one or more products' section 
  • Provide the desired quantity in the “Quantity settings” section 
  • Click on the Generate code button at the bottom of the page 
  • Copy the link and paste it into your HTML page

3. Start the Checkout process. Starting the checkout process will display the payment overlay and the inline cart on your website.

Sample request

The below request represents a basic use of InLine Checkout, that allows your users to finalize purchases directly from your website via a secure payment form.

TwoCoInlineCart.setup.setMerchant('merchantCode'); // your Merchant code

TwoCoInlineCart.products.add({
    code: 'the-2co-product-code',
    quantity: 3
}); // add products to cart

TwoCoInlineCart.cart.checkout(); // start checkout process
Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo