Device Fingerprint SDK
Este SDK genera client-side todos los fingerprints asociados a los proveedores que va a usar el comercio.
Generación del DEUNA FraudID
Este script genera un base64 encoded fraudId
que contiene todos los device fingerprints de los proveedores de pago y fraude que el comercio va a usar. De esta manera, el comercio no tiene que incluir cada unos de los SDKs de sus proveedores y tener lógica para recolectar cada uno de ellos y mandarlos a DEUNA.
var script = document.createElement('script');
script.id = 'deuna-cdl';
script.src = 'https://cdn.getduna.com/cdl/index.js';
var loadScript = function () {
var cdl = DeunaCDL();
cdl
.configure({
apiKey: '<public API Key of DEUNA>',
// use "production" for sandbox and production
env: '<environment name>', // 'production'
// key / value where the key is the name of the provider and the value is an object
// with the data required to generate the fingerprint with given provider.
fraudConfig: {
MERCADOPAGO: {}, // for MP is empty object
},
})
.then(function () {
const deviceId = cdl.getFraudId(); //"eyJoZWxsbyI6IndvcmxkIn0="
// just an example on how the merchant will do the /purchase API call
fetch(
'{{base_url}}/merchants/transactions/purchase',
{ method: 'POST', ... },
{
body: JSON.stringify(data),
}
);
});
};
script.onload = loadScript; // Up to the merchant where to initialize this script
document.body.appendChild(script);
Donde mandar el fraudID generado
Este fraudId
debe ser enviado en el /purchase
API.
- En el /purchase V2 se debe mandar en el body:
-
{ ..., "anti_fraud_info": { "device": { "fingerprint": "<add here the fraudID>" } }, ... }
-
- En el /purchase V1 se debe mandar en:
-
{ ..., "device_id": "<add here the fraudID>" ... }
-
Proveedores de pagos y motores antifraude disponibles para configurar
Puedes consultar el siguiente enlace en donde puedes revisar los proveedores de antifraude soportados con DEUNA. Además te entregamos una tabla con todos los atributos soportados para cada una de las opciones de motores antifraude que soporta el widget
Nombre | Atributos | Ejemplo |
---|---|---|
SIGNIFYD | No requiere parámetros a nivel merchant_id | fraudCredentials: { SIGNIFYD: {} } |
SIFT | accountId, restApiKey | fraudCredentials: { SIFT: { accountId: '', restApiKey: '' } } |
CLEARSALE | ClientId | fraudCredentials: { CLEARSALE: { clientId: '' } } |
CLEARSALE-BRASIL | ClientId | fraudCredentials: { CLEARSALE-BRASIL: { clientId: '' } } |
CYBERSOURCE | orgId, merchantId | fraudCredentials: { CYBERSOURCE: { orgId: '', merchantId: '' } } the orgId must be always 1snn5n9w for TEST and k8vif92e for PRODUCTION |
STRIPE | API_KEY | fraudCredentials: { STRIPE: { apiKey: '' } } |
MERCADOPAGO | // No requiere parámetros a nivel merchant_id | fraudCredentials: { MERCADOPAGO: {} } |
BAZ | orgId, merchantId | fraudCredentials: { BAZ: { orgId: '', merchantId: '' } } |
Updated about 1 month ago