Device fingerprint

Integrate DEUNA's device fingerprint for anti-fraud and payment engines in your application.

You must generate your own fingerprints for most engines.

DEUNA offers a script / SDK that creates all necessary fingerprints to avoid manual tasks for each fingerprint script.

📘

For Mercado Pago, all customers must add a script when activating Mercado Pago with DEUNA.

Integrates the device fingerprint of anti-fraud and payment engines.

1. Add the Mercado Pago script

This script automatically loads everything needed to create the Device Fingerprint, which is sent when processing with Mercado Pago or whatever the anti-fraud or payment engine is.

Mercado Pago and other providers require this information to secure the transaction.

window.DEUNA_CREDENTIALS = {  
  <provider name>: {},  
}

// example
window.DEUNA_CREDENTIALS = {  
  MERCADOPAGO: {},  
}

🚧

Without the script, your transaction is more likely to be rejected. Mercado Pago uses this identifier to ensure your transaction isn't fraudulent..

2. Select the suppliers

Select anti-fraud engine providers.

📘

Refer to Global suppliers and to Anti-fraud engines for the entire offering list.

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

EngineAttributesExample
BAZorgId, merchantIdBAZ: { orgId: '', merchantId: '' }
CLEARSALE
/ CLEARSALE-BRASIL
ClientIdCLEARSALE: { clientId: '' }
CLEARSALE-BRASIL: { clientId: '' }
CYBERSOURCEorgId, merchantIdCYBERSOURCE: { orgId: '', merchantId: '' }
MERCADOPAGODoes not require parameters at the merchant_id levelMERCADOPAGO: {}
SIFTaccountId, restApiKeySIFT: { accountId: '', restApiKey: '' }
SIGNIFYDDoes not require parameters at the merchant_id levelSIGNIFYD: {}
STRIPEAPI_KEYSTRIPE: { apiKey: '' }
RISKIFIEDstoreDomainRISKIFIED: { storeDomain: '' }
ACCERTIFYid, dvcACCERTIFY: { id: '', dvc: '' }

3. Generate the fingerprints

Generate fingerprints depending on your integration type.

3.1 DEUNA Payment widget

Generate fingerprints depending on your integration type.

window.DEUNA_CREDENTIALS = {  
  <provider name>: {},  
}

// example
window.DEUNA_CREDENTIALS = {  
  MERCADOPAGO: {},  
}
  1. Ensure the loading order.
  2. Make sure the script loads before pressing the checkout button and displaying the modal.
  3. Make sure you're not loading payment provider or anti-fraud code from Google Tag Manager or another source.
  4. Validate the credentials in the developer console.
window.DEUNA_CREDENTIALS

This should display the same script you configured earlier, and validates a correct configuration.

📘

These measures will ensure that your implementation with DEUNA and the supplier is successful.

3.2 Direct API

Add the fingerprint script.

The script includes a DEUNA SDK that is capable of generating fingerprints from any provider under a single integration.

📘

The examples generate the provider fingerprint.

Web SDK

  1. Follow the steps to add and initialize the Web SDK.
  2. Use the script to generate the fingerprint.
<script>
    var script = document.createElement("script");
    script.id = "deuna-sdk";
    script.src = "https://cdn.deuna.io/web-sdk/v1.1/index.js";
    
    script.onload = async function () {  // ✅ Make function async
        // Initialize the SDK
        await DeunaSDK.initialize({
            publicApiKey: "<public api key>",
            env: "sandbox"  // "sandbox" or "production"
        });

        // Get the MasterDeviceId from DEUNA
        const fraudId = await DeunaSDK.generateFraudId({
            someProvider: {  // ✅ Replace with actual provider name
                // provider-specific data
            }
        });

        console.log("Fraud ID:", fraudId);
    };

    document.body.appendChild(script);
</script>

iOS SDK

  1. Follow the steps to add and initialize the DEUNA SDK.
  2. Use the function generateFraudId to generate the fingerprint.
deunaSDK.generateFraudId(
  params: [
    "RISKIFIED": [
      "storeDomain": "volaris.com"
    ]
  ]
) { fraudId in
   
}

Android SDK

  1. Follow the steps to add and initialize the DEUNA SDK.
  2. Use the function generateFraudId to generate the fingerprint.
deunaSDK.generateFraudId(
  context = context,
  params = mapOf(
    "RISKIFIED" to mapOf(
      "storeDomain" to "deuna.com"
    )
  ),
  callback = { fraudId ->
  }
)
  1. Get the value of the device fingerprint and send it through the Payments API.
  {
      "token": "e4caabfb-3ed5-4930-a4fc-dd6e4812bd03", // order token
      "email": "john.doe@gmail",
      "method_type": "credit_card", 
      ...
      // mandar el fingerprint como base64
      "device_id": "<device fingerprint generated by the DEUNA Fraud SDK>",
      ...
  }
  {
    "payer_info": {
      "email": "[email protected]",
      "card_holder_dni": "12345678"
    },
    "payment_source": {
      "method_type": "debit_card",
      "card_info": {
        "card_id": "<card id>"
      }
    },
    "order": {
      "order_id": "DEUNA-NOW-69553619",
       // ...
    },
    "anti_fraud_info": { // dentro de este objeto se manda el fingerprint
      "device": {
        // mandar el fingerprint como base64
        "id": "<device fingerprint generated by the DEUNA Fraud SDK>"
      }
    }
  }

3.3 CVTEX Connector

📘

Generate fingerprints with the VTEX fingerprint integration.