@capgo/capacitor-verisoul

June 16, 2026 ยท View on GitHub

Capgo - Instant updates for Capacitor

Get Instant updates for your App with Capgo

Missing a feature? We'll build the plugin for you

Capacitor plugin for Verisoul native fraud-prevention sessions.

Installation

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

npx skills add https://github.com/cap-go/capacitor-skills --skill capacitor-plugins

Then use the following prompt:

Use the `capacitor-plugins` skill from `cap-go/capacitor-skills` to install the `@capgo/capacitor-verisoul` plugin in my project.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

npm install @capgo/capacitor-verisoul
npx cap sync

iOS setup

Verisoul recommends enabling App Attest for stronger iOS device checks. Add the capability in Xcode and include the entitlement that matches your environment:

<key>com.apple.developer.devicecheck.appattest-environment</key>
<string>production</string>

Use development for test builds.

Android setup

The plugin adds the Verisoul Maven repository and required network permissions. If your app build cannot resolve ai.verisoul:android, add this repository to your app root Gradle repositories:

maven { url = uri("https://us-central1-maven.pkg.dev/verisoul/android") }

Usage

import { Verisoul } from '@capgo/capacitor-verisoul';

await Verisoul.configure({
  environment: 'prod',
  projectId: 'YOUR_PROJECT_ID',
});

const { sessionId } = await Verisoul.getSessionId();

await Verisoul.reinitialize();

On Android, forward touch events when you need Verisoul touch-signal collection:

await Verisoul.recordTouchEvent({
  x: 120,
  y: 240,
  action: 'down',
});

API

configure(...)

configure(options: ConfigureOptions) => Promise<void>

Initialize Verisoul. Call this once, early in app startup.

ParamType
optionsConfigureOptions

getSessionId()

getSessionId() => Promise<SessionIdResult>

Return the current Verisoul session identifier.

The value may take a few seconds to become available after configure().

Returns: Promise<SessionIdResult>


reinitialize()

reinitialize() => Promise<void>

Reset Verisoul signal collection and create a fresh session.

Use this when account context changes, for example after logout/login.


recordTouchEvent(...)

recordTouchEvent(options: RecordTouchEventOptions) => Promise<void>

Forward a touch event to Verisoul.

Android uses this for bot-detection touch signals. iOS resolves without work because the iOS SDK does not expose a matching public API.

ParamType
optionsRecordTouchEventOptions

Interfaces

ConfigureOptions

PropTypeDescription
environmentVerisoulEnvironmentVerisoul project environment. Use prod or production for production traffic and sandbox for testing.
projectIdstringVerisoul project identifier.

SessionIdResult

PropTypeDescription
sessionIdstringVerisoul session identifier. Send this value to your backend before calling Verisoul's server-side assessment APIs.

RecordTouchEventOptions

PropTypeDescription
xnumberTouch X coordinate in view pixels.
ynumberTouch Y coordinate in view pixels.
actionVerisoulTouchActionTouch action. Android forwards this to the native Verisoul SDK. iOS currently ignores this method because the Verisoul iOS SDK does not expose the same public touch-event hook.

Type Aliases

VerisoulEnvironment

'dev' | 'sandbox' | 'staging' | 'prod' | 'production'

VerisoulTouchAction

'down' | 'up' | 'move' | 0 | 1 | 2