Integration
Best Practices
Best practices for integrating Verisoul
For optimal fraud detection and user experience, follow these two critical best practices when integrating Verisoul
1. Initialize the Client SDK as Early as Possible
Why this matters: Early initialization allows Verisoul to collect the maximum amount of behavioral and device signals, resulting in more accurate risk assessments.
Implementation by Platform
Web SDK
Add the Verisoul script to the <head>
section of your HTML to ensure it loads before the rest of your page content:
Mobile SDK
For our mobile SDKs, initialization happens automatically when the SDK is integrated. Ensure you’re following the platform-specific integration guides:
Benefits of Early Initialization
- Allows more time for signal collection
- Captures the full user journey
- Improves accuracy of behavioral analysis
- Enables detection of suspicious patterns from the start
2. Call the Verisoul API at the Time of Critical Actions
Why this matters: While you should initialize the SDK early, you should wait to call the authenticate endpoint until the moment of a critical action.
Critical Action Examples
- User registration
- User login
- Payment processing
- Rewards redemption
- Account withdrawal
- Profile or settings changes
- High-value transactions
Implementation Guidance
- Initialize the SDK early in the user journey
- Collect the session ID when needed
- Call the appropriate endpoint (Authenticate or Unauthenticated) at the exact moment of the critical action
- Use the decision to allow, block, or verify the action
Why This Approach Works
- Maximum signal collection: Client SDKs continuously collect data, so waiting allows more time for signals to be gathered
- Defeats “human in the loop” fraud: Fraudsters often create accounts manually but later automate actions
- Example: A fraudster creates an account as a human, verifies their email, and then logs in and starts a bot
- Captures intent signals: The most revealing behavioral signals often occur right before a critical action
- Reduces false positives: More context leads to more accurate decisions