How to Install and Configure the Kount Anti-Fraud App in VTEX

Provide fraud protection to your storefront by installing the Kount app in the VTEX marketplace. Kount is the leading AI-driven fraud protection solution for your business. To successfully set up the Kount app, you must have your Agent Web Console (AWC) sign-in credentials and an existing VTEX account.

Installing and Configuring the Kount App

  1. Sign in to the VTEX commerce platform.

  2. Go to the VTEX store settings and select Payment > Settings.

  3. Select Gateway Affiliations.

    vtex_gateway_1.png
  4. Select +, and then select Kount.

    vtex_add_1.png
    vtex_add_2.png
  5. Fill out the Gateway Affiliation form.

    • Affiliation Name: This setting defaults to Kount - New configuration. You can change this setting to fit your organizational needs.

    • Test Live/Production: This setting lets you toggle between test and production after configuration.

    • Application Key: Enter your Kount-provided Merchant ID (MID). If you do not have your MID, contact your Kount Customer Success Manager.

    • Application Token: Enter your Kount API key. Refer to How to Create an API Key for Authentication to Kount if you have not already created one.

    • Enable Risk Pre-Analysis: This setting enables Pre-Analysis Authorization which lets you perform a fraud analysis before attempting a payment authorization from your gateway.

    • Kount Website ID: You must set up the Website ID in the Agent Web Console (AWC). The Website ID is the eight character ID that identifies your ENS URL. The ENS URL template is: https://api.kount.com/tpa/ens/platform/VTEX/shop/<shop identifier>. The shop identifier is the name of your store before myvtex.com in your URL. Go to Getting your Website ID.

  6. After you have filled out the fields for Application Key, Application Token, and Kount Website ID, select Save.

    vtex_save_1.png

Creating your Website ID

  1. Sign in to the Agent Web Console (AWC) using your Kount credentials.

  2. Select Fraud Control and then Websites.

    vtex_awc_1.png
  3. Select Add Website.

    vtex_awc_2.png
  4. Fill out out the form.

    • Website: Enter your Website ID. The shop identifier is the name of your store located before myvtex.com in your URL. The Website ID is used while configuring the app.

    • Description: Add a description for the website to help with organization and tracking (optional).

    • ENS Enabled: Set as Yes.

    • Merchant ENS URL: Your ENS URL must follow this template: https://api.kount.com/tpa/ens/platform/VTEX/shop/<shop identifier>.

Linking to a Payment Gateway

  1. Sign in to the VTEX commerce platform.

  2. Go to the VTEX store settings and select Payment > Settings.

  3. Select the store card you want to add the Kount app to.

  4. Select the Use anti-fraud solution checkbox.

  5. Select the Kount Affiliation Name you created during configuration.

    vtex_useantifraud_1.png
  6. Select Save.

Installing the Device Data Collector with Google Tag Manager

  1. Sign in to the VTEX commerce platform.

  2. Go to Settings > Storefront > Checkout.

  3. Go to the store(s) you want to add the Device Data Collector (DDC) to and then go to the store settings. Once in the store settings, select Checkout.

    Note: Use the default store if you want to apply the DDC to all of your stores.

    vtex_settings_checkout_2.png
  4. Enter your Google Tag Manager Collection ID (GTM-XXXX) in the Google Tag Manager field.

    vtex_gtag_id_1.png
  5. To set up the Google Tag for DDC, create a new custom HTML Google Tag, update line four of the code with ssl or tst, and then update the merchant ID with your merchant ID. Set triggering for this tag to All Pages. Go to Setting up Google Tag Manager on the VTEX developer site for more information.

    Refer to the following code example:

    <script>
    document.body.setAttribute("class", "kaxsdc " + document.body.getAttribute("class"));
      
    var url = "https://tst.kaptcha.com/collect/sdk?m=987654";
    var startTime = new Date().getTime();
    
    var loadSecondScript = function () {
            var kclient = new ka.ClientSDK();
            kclient.setupCallback(
                {
                    'collect-end':
                            function (params) {
                                    var endTime = new Date().getTime();
                                    /* console.log("Client side collector (approx) time: " + (endTime - startTime) + " mills"); */
                            },
                    'collect-begin':
                            function (params) {
                                    sessionStorage.setItem("kMercSessId", params['MercSessId']);
                            /* console.log("Begin\nMercSessId: " + sessionStorage.getItem("kMercSessId")); */
                                    if (window.vtex !== undefined && sessionStorage.getItem("kMercSessId") !== window.vtex.deviceFingerprint) {
                                            window.vtex.deviceFingerprint = sessionStorage.getItem("kMercSessId");
                              /* console.log("Setting deviceFingerprint - MercSessId: " + window.vtex.deviceFingerprint + " - " + sessionStorage.getItem("kMercSessId")); */
                                    }
                            }
            });
            kclient.autoLoadEvents();
    }
    
    if (sessionStorage.getItem("kMercSessId") === null) {
            loadScript(url, loadSecondScript);
    };
    
    if (window.vtex !== undefined && sessionStorage.getItem("kMercSessId") !== window.vtex.deviceFingerprint) {
      window.vtex.deviceFingerprint = sessionStorage.getItem("kMercSessId");
       console.log("Setting deviceFingerprint - MercSessId: " + window.vtex.deviceFingerprint + " - " + sessionStorage.getItem("kMercSessId"));
    }
      
    function loadScript(url, callback) {
            var head = document.getElementsByTagName('head')[0];
            var adapterScript = document.createElement('script');
            adapterScript.src = url;
            adapterScript.type = "text/javascript";
            adapterScript.onreadystatechange = callback;
            adapterScript.onload = callback;
            head.appendChild(adapterScript);
    }
    </script>
    Note: Use ssl.kaptcha.com when the anti-fraud provider is configured for Live or Production, and use tst.kaptcha.com when the anti-fraud provider is configured for Test.

Verifying the Kount App on VTEX Orders

Once you have installed and configured the Kount Anti-Fraud App, you are able to see the app on orders within your stores.

  1. Sign in to the VTEX commerce platform.

  2. Select Orders and then Transactions.

    vtex_orders_1.png
  3. You can view the status of the orders in Transactions. The three order statuses are:

    • Approved: These orders have passed risk analysis and the payment is processed.

    • Canceled: These orders have not passed risk analysis and the payment is not processed.

    • Analyzing Risk: These orders are pending review in the Kount Agent Web Console (AWC). You must sign in to the AWC to process these transactions.

Was this article helpful?
0 out of 0 found this helpful