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:
Engine | Attributes | Example |
---|---|---|
BAZ | orgId, merchantId | BAZ: { orgId: '', merchantId: '' } |
CLEARSALE / CLEARSALE-BRASIL | ClientId | CLEARSALE: { clientId: '' } CLEARSALE-BRASIL: { clientId: '' } |
CYBERSOURCE | orgId, merchantId | CYBERSOURCE: { orgId: '', merchantId: '' } |
MERCADOPAGO | Does not require parameters at the merchant_id level | MERCADOPAGO: {} |
SIFT | accountId, restApiKey | SIFT: { accountId: '', restApiKey: '' } |
SIGNIFYD | Does not require parameters at the merchant_id level | SIGNIFYD: {} |
STRIPE | API_KEY | STRIPE: { apiKey: '' } |
RISKIFIED | storeDomain | RISKIFIED: { storeDomain: '' } |
ACCERTIFY | id, dvc | ACCERTIFY: { 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: {},
}
- Ensure the loading order.
- Make sure the script loads before pressing the checkout button and displaying the modal.
- Make sure you're not loading payment provider or anti-fraud code from Google Tag Manager or another source.
- 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
- Follow the steps to add and initialize the Web SDK.
- 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
- Follow the steps to add and initialize the DEUNA SDK.
- Use the function
generateFraudId
to generate the fingerprint.
deunaSDK.generateFraudId(
params: [
"RISKIFIED": [
"storeDomain": "volaris.com"
]
]
) { fraudId in
}
Android SDK
- Follow the steps to add and initialize the DEUNA SDK.
- Use the function
generateFraudId
to generate the fingerprint.
deunaSDK.generateFraudId(
context = context,
params = mapOf(
"RISKIFIED" to mapOf(
"storeDomain" to "deuna.com"
)
),
callback = { fraudId ->
}
)
- Get the value of the device fingerprint and send it through the Payments API.
- For V1 Purchase:
{
"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>",
...
}
- ForV2 Purchase:
{
"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.
Updated 15 days ago