{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab"]},"redocly_category":"SDK Reference","type":"markdown"},"seo":{"title":"Overview","description":"Everything about Mosaic Journeys, SDKs, and APIs","siteUrl":"https://developer.transmitsecurity.com/","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"overview","__idx":0},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flutter_ts_account_protection"]}," is a Flutter plugin for Mosaic ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/risk/overview"},"children":["Fraud Prevention"]}," on Android and iOS."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When initialized, the plugin automatically starts collecting and submitting telemetry data to Mosaic—including information about the user journey, device data, and user interactions. Once specific user actions are performed on the client side (such as login), Fraud Prevention should be called to track those action events and obtain action tokens. The data collected can then be queried for recommendations using the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/risk/recommendations.openapi"},"children":["Recommendations"]}," backend API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"requirements","__idx":1},"children":["Requirements"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Flutter 3.0.0 or higher"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["iOS 13.0 or higher"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Android API level 24 (Android 7.0) or higher"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dart 2.17.0 or higher"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"installation","__idx":2},"children":["Installation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add the plugin to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pubspec.yaml"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"dependencies:\n  flutter_ts_account_protection:\n    git:\n      url: https://github.com/TransmitSecurity/flutter_ts_account_protection.git\n      ref: 1.0.0\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then run:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"flutter pub get\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"platform-configuration","__idx":3},"children":["Platform configuration"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Android","disable":false},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"buildgradle","__idx":4},"children":["build.gradle"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add the Transmit Security Maven repository to your module-level ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["android/build.gradle"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"allprojects {\n    repositories {\n        google()\n        mavenCentral()\n        maven {\n            url \"https://transmit.jfrog.io/artifactory/transmit-security-gradle-release-local/\"\n        }\n    }\n}\n","lang":"gradle"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["android/app/build.gradle"]},", set the minimum SDK version:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"android {\n    compileSdkVersion 34\n    defaultConfig {\n        minSdkVersion 21\n        targetSdkVersion 34\n    }\n}\n","lang":"gradle"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"androidmanifestxml","__idx":5},"children":["AndroidManifest.xml"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["android/app/src/main/AndroidManifest.xml"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<uses-permission android:name=\"android.permission.INTERNET\" />\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"stringsxml","__idx":6},"children":["strings.xml"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Update your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["strings.xml"]}," file with your credentials:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<resources>\n    <string name=\"transmit_security_client_id\">\"CLIENT_ID\"</string>\n    <string name=\"transmit_security_base_url\">https://api.transmitsecurity.io/risk-collect/</string>\n</resources>\n","lang":"xml"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"iOS","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The iOS SDK requires iOS 13.0 or higher. The native SDK is included via Swift Package Manager—no additional configuration is required."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"transmitsecurityplist","__idx":7},"children":["TransmitSecurity.plist"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransmitSecurity.plist"]}," file in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ios/Runner/"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n    <key>clientId</key>\n    <string>[CLIENT_ID]</string>\n    <key>baseUrl</key>\n    <string>https://api.transmitsecurity.io/risk-collect</string>\n</dict>\n</plist>\n","lang":"xml"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the appropriate base URL for your environment:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Environment"},"children":["Environment"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Base URL"},"children":["Base URL"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["US"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.transmitsecurity.io/risk-collect/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EU"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.eu.transmitsecurity.io/risk-collect/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Canada"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.ca.transmitsecurity.io/risk-collect/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Australia"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.au.transmitsecurity.io/risk-collect/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom domain"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://<your_custom_domain>/risk-collect/"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initialization","__idx":8},"children":["Initialization"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Import the package and create an instance of the plugin:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"import 'package:flutter_ts_account_protection/flutter_ts_account_protection.dart';\n\nfinal accountProtection = FlutterTsAccountProtection();\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Simple initialization (using platform configuration files):"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"await accountProtection.initializeSDK();\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["With explicit parameters:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"await accountProtection.initialize(\n  'YOUR_CLIENT_ID',\n  'https://api.transmitsecurity.io/risk-collect/',\n  configuration: TSInitSDKConfiguration(\n    enableLocationEvents: true,\n  ),\n  userId: 'optional-user-id',\n);\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"initialize-parameters","__idx":9},"children":["initialize parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your client ID from the Admin Portal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The base URL for your environment (see table above)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["configuration"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSInitSDKConfiguration?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional configuration object (see below)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set the user ID during initialization if already known"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Configuration options:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default"},"children":["Default"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enableLocationEvents"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enables reporting device location during plugin initialization and when the app moves to the foreground. The user must consent to sharing location in advance (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/risk/report_geolocation"},"children":["Track geolocation"]},")."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":10},"children":["Next steps"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For a complete end-to-end integration walkthrough, see the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/risk/quick_start_flutter"},"children":["Flutter plugin quick start"]},"."]}]},"headings":[{"value":"Overview","id":"overview","depth":1},{"value":"Requirements","id":"requirements","depth":2},{"value":"Installation","id":"installation","depth":2},{"value":"Platform configuration","id":"platform-configuration","depth":2},{"value":"build.gradle","id":"buildgradle","depth":3},{"value":"AndroidManifest.xml","id":"androidmanifestxml","depth":3},{"value":"strings.xml","id":"stringsxml","depth":3},{"value":"TransmitSecurity.plist","id":"transmitsecurityplist","depth":3},{"value":"Initialization","id":"initialization","depth":2},{"value":"initialize parameters","id":"initialize-parameters","depth":3},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Fraud Prevention overview","markdown":{"toc":{"depth":2}},"seo":{"title":"Overview"}},"lastModified":"2026-06-23T11:07:36.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-ref/flutter-ts-accountprotection/drs_overview","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}