This SDK provides tools for collecting detailed device information to improve risk analysis and user experience on web applications. It combines browser data, risk assessment, and device intelligence into a single comprehensive dataset. The SDK is easy to integrate and allows you to access device and network details in real-time.

How to use

In an HTML document, include a script tag that’s hosted JS SDK. Repo:
Device Intelligence JS SDK

Env

Hosted JS SDK
  • Prod: https://vssdk-prod.cashfree.com/device-intel-js-sdk/0.0.1/index.mjs
<html>
  <head>
    <title>demo app</title>
    <script src="https://vssdk-prod.cashfree.com/device-intel-js-sdk/0.0.1/index.mjs"></script>
  </head>
  <body>
    <div id="cashfree-vs"></div>
  </body>
</html>

Sample usage (Next.js)

"use client";
import React, { useEffect, useState } from "react";
import Script from "next/script";

function Page() {
  const [deviceData, setDeviceData] = useState(null);
  const [sdkLoaded, setSdkLoaded] = useState(false);

  useEffect(() => {
    const loadDeviceData = async () => {
      if (sdkLoaded && window.DeviceIntelligence) {
        try {
          const data = await window.DeviceIntelligence.getDeviceData();
          console.log(data);
          setDeviceData(data);
        } catch (error) {
          console.error("Failed to fetch device data:", error);
        }
      }
    };
    loadDeviceData();
  }, [sdkLoaded]);

  return (
    <div>
      <Script
        src="https://vssdk-prod.cashfree.com/device-intel-js-sdk/0.0.1/index.mjs"
        type="module"
        strategy="afterInteractive"
        onLoad={() => setSdkLoaded(true)}
        onError={() => console.error("Failed to load Device Intelligence SDK")}
      />
    </div>
  );
}

export default Page;

SDK build structure

  • index.d.ts: TypeScript declaration file.
  • index.js: CommonJS version for Node.js.
  • index.mjs: ES module version for modern browsers.
  • index.umd.js: UMD version compatible with multiple environments.

Methods

MethodDescription
getBrowserDataFetches data about the user’s browser.
getRiskDataGathers risk-related device and network properties.
getDeviceDataCombines getBrowserData and getRiskData.
getEncodedDeviceDataRetrieves and Base64-encodes the combined device data for secure transfer.

getBrowserData keys

KeyInfoValue
device_typeScreen InformationDesktop
device_hashUnique Identifier3610851045751326452526200607540625753820592235180891750619814363
os_nameOperating System NameMac OS
os_versionOS Version10.15.7
user_agentBrowser User AgentMozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)…
browser_nameBrowser Application NameGoogle Chrome
browser_versionBrowser Version130.0
cookie_enabledCookies Enabledtrue
screen_widthDevice Screen Width1512
screen_heightDevice Screen Height982
region_timezoneTimezone DataAsia/Calcutta
region_timezone_offsetTimezone Offset+05:30
region_languageBrowser Languageen-GB
installed_fontsInstalled FontsArial Unicode MS, Gill Sans…
installed_pluginsInstalled PluginsPDF Viewer, Chrome PDF Viewer…
gpu_rendererGPU InformationWebKit WebGL
cookie_hashHash of Browser Cookies0d8c0ae86aa36887b6f889eb382fb5ef79e288c25bc280a44b8e356f14d1a282
browser_hashHash of Browser User Agent37c9e0fb5195ca4e93ba77829bfa87f3a97724aded19df77669186d8714f49fc
private_modeIncognito Modefalse
battery_percentageBattery Percentage100.00%
canvas_device_fingerprintCanvas Fingerprint206184060
audio_fingerprintAudio Fingerprint124.04346607114712
private_browserPrivate Browser Detectionfalse
web_rtc_ipsWeb RTC IPs

getRiskData keys

KeyInfoValue
installed_botsList of Installed Botsfalse
high_activityDevice Activitytrue
vpn_time_zone_mismatch_istVPN Detectionfalse
user_ipUser IP103.153.105.199, 130.176.165.155
tampering_detectionTampering Detectionfalse
virtual_machine_detectionVirtual Machine DetectionInconclusive
privacy_settingsPrivacy Settings{"doNotTrack":false,"cookiesDisabled":true}
privacy_browsersPrivacy Browsersfalse
visitor_idUnique Visitor ID92596184-cf35-4d7b-ee3a-2accc48dc9ab
session_idUnique Session ID68d428fc8a20c417701a40e377df13e0
browser_anti_finger_printing_extensionAnti Fingerprinting Extension
internet_typeInternet Type4g

Consistent values

AttributeFirefoxChromeEdgeSafariBraveTorDuckDuckGoVivaldiOpera
CanvasStandard: Consistent. Private: Obfuscated (Strict ETP)Consistent in both modesConsistent in both modesConsistent. Private: No additional obfuscationRandomized in both modesStandardized across all usersLimited obfuscationConsistent in both modesConsistent. Private: No additional obfuscation
AudioConsistent in both modesConsistent in both modesConsistent in both modesConsistent in both modesConsistent with limited noise in private modeStandardized across all usersConsistent in both modesConsistent in both modesConsistent in both modes
WebGLConsistent. Private: Obfuscated (Strict ETP)Consistent in both modesConsistent in both modesConsistent. Private: No additional obfuscationRandomized in both modesStandardized across all usersConsistent in both modesConsistent in both modesConsistent in both modes
TimezoneMatches system settings. Private: No changeMatches system settings in both modesMatches system settings in both modesMatches system settings. Private: No changeMatches system settings. Private: No changeStandardized across all usersMatches system settings in both modesMatches system settings in both modesMatches system settings in both modes
FontsConsistent. Private: Obfuscated (Strict ETP)Consistent in both modesConsistent in both modesConsistent. Private: No changeRandomized in both modesStandardized across all usersConsistent in both modesConsistent in both modesConsistent in both modes
LanguagesMatches browser settings in both modesMatches browser settings in both modesMatches browser settings in both modesMatches browser settings. Private: No changeMatches browser settings. Private: No changeMatches browser settingsMatches browser settings in both modesMatches browser settings in both modesMatches browser settings in both modes
PlatformMatches system settings. Private: No changeMatches system settings in both modesMatches system settings in both modesMatches system settings. Private: No changeMatches system settings. Private: No changeStandardized across all usersMatches system settings in both modesMatches system settings in both modesMatches system settings in both modes

Browser IDs

BrowserNormal Mode IDPrivate Mode IDUnique
Chromef74c2157b0146e764f04ca5769f5cdf9f74c2157b0146e764f04ca5769f5cdf9yes
Firefoxf761b27d3eab579a8816455c49cb6368f761b27d3eab579a8816455c49cb6368yes
Safari7869269fdc8fce0198a8dd818221aa647869269fdc8fce0198a8dd818221aa64yes
Operaf74c2157b0146e764f04ca5769f5cdf9f74c2157b0146e764f04ca5769f5cdf9yes
DuckDuckGoede2c6282b9ca540a39e992faedd9e09ede2c6282b9ca540a39e992faedd9e09yes
Edge4ee7b22aeed7d5c504ef5f7816cfb8294ee7b22aeed7d5c504ef5f7816cfb829yes
Bravef74c2157b0146e764f04ca5769f5cdf9f74c2157b0146e764f04ca5769f5cdf9yes