Before you get started
Install the package once via NPM using the following command:
npm i @sumsub/fisherman --save
NoteAlthough the product is called Device Intelligence, the corresponding NPM library is named
fisherman.
Use Device Intelligence in a session
To use Device Intelligence for detecting applicant fraudulent activities during a single session:
-
Generate an access token with a corresponding session ID.
-
Initialize our JS script using the acquired token.
const fisherman = await init({ /** * Access token that you generated on the backend in the previous step */ token: string, /** * An optional error callback * @param FishermanError error */ onError?: (error: FishermanError) => void, /** * An optional config to simulate `fingerprint()` * @param FpSimulationConf config */ simulationConfig?: FpSimulationConf })
- Capture the fingerprint(s) of the user's device to associate it with the user and enhance fraud detection capabilities during financial transactions and key actions such as login, signup, password change, and so on.
await fisherman.fingerprint(); - Submit the captured device data using one of the relevant API methods:
- Create an applicant profile (recommended for Sign Up events).
- Send applicant platform event with captured device.
- Send financial transaction with captured device.
- Destroy the SDK instance when finished to release browser resources.
fisherman.destroy();
Once the flow above is complete, you can proceed with reviewing the event check results.
NoteTo ensure comprehensive fraud detection, repeat this five-step cycle for each applicant platform event such as
login,sign up,password reset, and2FA reset.
Usage example
Below is a minimal setup example for using Device Intelligence:
import { init, destroy } from '@sumsub/fisherman'
const fisherman = await init({ token })
const handleLoginSubmit = async () => {
await fisherman.fingerprint();
// Confirm applicant platform event
destroy();
// Redirect user
}Review event check results
You can review the applicant event check results on the Transactions page in the Dashboard since these events are considered event transactions.
To view all the events checked via Device Intelligence:
- In the Dashboard, navigate to Transactions and Travel Rule → Transactions.
- From the Type filter, select User platform event.
- Click a transaction record to review its details.
Also, you can use the search bar to find an event transaction by a known applicant name, transaction ID, and so on.