Skip to main content
On this page
Integration method

Configure a DEUNA-powered payment experience inside VTEX.

Install the certified connector, configure payment terms, and extend VTEX checkout with DEUNA Widget capabilities.

Interface
VTEX checkout with DEUNA Widget
Delivery model
VTEX app and connector configuration
Best for
VTEX merchants using DEUNA payment orchestration

This page provides a guide to integrate DEUNA's device fingerprint with VTEX Widget V2.

Benefits of device fingerprint#

The new version of DEUNA's Widget introduces an innovative way to handle multiple fraud engines with just a few lines of code.

This functionality allows centralizing all relevant information in a single place, facilitating control and management by the merchant.

Among the benefits are:

  1. Clean Implementation: No need to implement additional scripts for anti-fraud engines; the widget automatically handles this process. You only need to enter the desired fraud engine and its credentials to activate it.
  2. Information Centralization: All your anti-fraud engine configuration data is kept in one place, making it easier to manage.
  3. Automation and updates: We manage the necessary updates and send fraud information to VTEX and the payment processor you configure.
  4. Flexibility in payment rules: You can configure multiple engines for different payment rules from the DEUNA administrator, ensuring information is sent correctly.

Requirements#

These are the requirements to integrate VTEX's device fingerprint:

  1. DEUNA administrator credentials.
  2. Anti-fraud engine credentials to configure.

Integrate device fingerprint#

Integrate VTEX's device fingerprint by following these steps:

1. Add fraudCredentials to your configuration#

Configure your script by adding the fraudCredentials option within the configuration attributes.

Javascript
function loadScriptWithAttributes(url, attributes, target) {
    return new Promise((resolve, reject) => {
        const script = document.createElement('script');
        script.src = url;

        if (attributes) {
            Object.keys(attributes).forEach(key => {
                script.setAttribute(key, attributes[key]);
            });
        }

        script.onload = resolve;
        script.onerror = reject;

		const currentTarget = target ?? document.head
        if (!currentTarget) {
          console.error("'currentTarget': is not defined")
 		}
		currentTarget.appendChild(script);        
    });
}


const baseURL = "https://cdn.deuna.io/snippets/v2.0.0/index.js";
console.log("DEUNA cdn: ", baseURL);
const attributes = { 
	  env: "ENVIRONMENT",
    publicApiKey: "API_KEY",
    fraudCredentials: JSON.stringify({ // THIS IS WHAT YOU ADD TO SUPPORT ANTI-FRAUD ENGINES
	    CLEARSALE: {
        "Client Id": "CLEARSALE_CREDENTIAL" 
      }
   })
};
 

loadScriptWithAttributes(baseURL, attributes)
    .then(() => {
      console.log("DEUNA: loaded script Succesfully!")
    })
    .catch((err) => {
      console.error("DEUNA: Error load script cdn: ", err);
    });

2. Select the provider#

Select anti-fraud engine providers from the available engines for device fingerprint

The following table contains attributes for engines supported by the widget:

NameAttributesExample
SIGNIFYDNo parameters required at merchant_id levelfraudCredentials: { SIGNIFYD: {} }
SIFTaccountId, restApiKeyfraudCredentials: { SIFT: { accountId: '', restApiKey: '' } }
CLEARSALEClientIdfraudCredentials: { CLEARSALE: { clientId: '' } }
CLEARSALE-BRASILClientIdfraudCredentials: { CLEARSALE-BRASIL: { clientId: '' } }
CYBERSOURCEorgId, merchantIdfraudCredentials: { CYBERSOURCE: { orgId: '', merchantId: '' } }
STRIPEAPI_KEYfraudCredentials: { STRIPE: { apiKey: '' } }
MERCADOPAGO// No parameters required at merchant_id levelfraudCredentials: { MERCADOPAGO: {} }
BAZorgId, merchantIdfraudCredentials: { BAZ: { orgId: '', merchantId: '' } }