Kwrapper Integration

The Kwrapper is a method for PSP (payment or merchant aggregator) to create a JavaScript wrapper for the Kount Device Collector. The Kwrapper is meant for use with Kount Central clients to integrate the Device Collector into their sub-merchant's order/transaction workflow. The Kwrapper still requires HTML code to be inserted into the customer's checkout/transaction page, but it simplifies the process (compared to inserting the full device collector JS/HTML).

Feature

  • The Kwrapper simplifies the Device Collector code integration for the sub-merchants that are under a PSP/payment aggregator.

  • The Kwrapper is a single JavaScript file that the PSP adds to their gateway that creates an iFrame instantly to gather device data.

  • The Kwrapper requires the PSP to store the generated SessionID value in their database to then pass to Kount for future Risk Inquiry Service (RIS) calls associated with the transaction.

    The only requirements of the customer is to insert a short snippet of JavaScript code onto their order/transaction page (checkout page).

What are the benefits of this feature?

  • It eliminates the need for the customer to have to generate, store and manage the SessionID values.

  • The SessionID handling is offloaded to the PSP.

  • The customer only needs to add a small snippet of JavaScript to their checkout (or equivalent) page, and edit the value of minimally two values (MerchantID and FormID, with optional SiteID if PSP is offering custom rules per-merchant site).

When to use this feature?

The Kwrapper is for use with Kount Central customers who do not want to burden their customers with having to manage SessionID generation and storage.

Technical Details

  • The customer embeds a small snippet of JavaScript code into their checkout/transaction page that has a few options to configure.

  • The two use cases for the Kwrapper are either for Portfolio-level Kount rules (Kount Central Portfolio) or Merchant-level Kount rules (Kount Central Fraud Manager or Kount Central Enterprise):

    Kount Central Portfolio use case: No SiteID needed.

  • Kount Central Fraud Manager or Kount Central Enterprise: Need a SiteID value to identify the merchant.

Gateway steps

Implement Device Data Collector and RIS as normal for pertinent environments.

TEST

  • Device Data Collector: https://tst.kaptcha.com

  • RIS: https://risk.test.kount.net

  • AWC: https://awc.test.kount.net

PROD

  • Device Data Collector: https://ssl.kaptcha.com

  • RIS: https://risk.kount.net

  • AWC: https://awc.kount.net

The TEST and PROD environment logo.htm and logo.gif paths need to be added to the Kwrapper.js file along with the customer's MID in place of XXXXXX.

Lines 892-896

test: new WrapperData.Environment("test", "https://test.gateway.com/path/to/logo.htm", "XXXXXX"),
prod: new WrapperData.Environment("prod", "https://prod.gateway.com/path/to/logo.htm", "XXXXXX"),
beta: new WrapperData.Environment("beta", "https://beta.gateway.com/path/to/logo.htm", "XXXXXX"),

Image size in kwrapper.js file needs set to match image size of redirect image.

Lines 968-969

iframe.width = 88; // can change to 1
iframe.height = 31; // can change to 1

Gateway/PSP must make edits in kwrapper and create documentation to provide to customers who own the checkout pages on how to initialize kwrapper library.

Example of what gateway would document for their merchants on how to use kwrapper.js.

FormDOMid is provided by merchant from checkout form by a form ID

<form id=" FormDOMid">
[form details here]
</form
<script src="https://js.gateway.com/path/to/kwrapper.js"></script>
<script>
WrapperData.setup('yourFormDOMId', WrapperData.environments.prod);
</script>

Customer steps

Create a form ID for the checkout form.

Add JavaScript to the checkout page specifying the Gateway MID, checkout form ID, and environment.

<form id=" FormDOMid">
[form details here]
</form>

<script src="https://js.gateway.com/path/to/kwrapper.js"></script>
<script>
WrapperData.setup('yourFormDOMId', WrapperData.environments.prod);
</script>

Passing a SiteID (Optional)

The WrapperData.setup() method, by default, takes two parameters:

  1. FormDOMID: The form ID used by the web-form on the page the kwrapper is used.

  2. WrapperData.environments.NAME: The environment name configured in the kwrapper code on lines 892-896.

  3. Optionally, it can take a third parameter, SiteID. This is the unique website ID for customers that have more than one website:

    WrapperData.setup('yourFormDOMId', WrapperData.environments.prod, 'SiteID');

    kwrapper_workflow_1.png
Was this article helpful?
0 out of 0 found this helpful