FraudSense Studio
FraudSense Studio is a no-code configuration dashboard at app.getfraudsense.com where you manage your entire fraud detection setup visually â without writing code after your initial SDK integration.
api.getfraudsense.com) handles scoring. Studio (app.getfraudsense.com) is where you configure how scoring works for your workspace.Studio pages
| Page | What it does |
|---|---|
| Overview | Dashboard with signal counts, rule counts, score band summary, and quick actions |
| Analytics | Live device intelligence â sessions, risk distribution, top triggered signals |
| Signal Manager | Toggle signals on/off, adjust weights, add custom signals, publish to fraud API |
| Rule Builder | Build IF/THEN detection rules, test rules, generate rules with Claude AI |
| Score Composer | Configure LOW/MEDIUM/HIGH/CRITICAL score band thresholds per workspace |
| Connectors & Webhooks | Add webhook endpoints, configure connectors (Stripe, Shopify, etc.), API enrichment |
| SDK Setup | Step-by-step integration guide with your API key pre-filled in all code snippets |
| Team Members | Invite team members, assign roles, manage access |
| Settings | Manage your Anthropic API key (for AI rule generation) and FraudSense API key |
Logging in
Studio uses Clerk authentication. Sign in at app.getfraudsense.com/sign-in with Google, GitHub, or email and password. New accounts are linked to your workspace automatically after payment.
Roles & Permissions
Studio supports three role levels. Roles are enforced across all pages â viewers cannot make changes even if they navigate directly to a page.
| Role | Access level | Can do |
|---|---|---|
| Admin | Full access | Edit everything â signals, rules, score bands, webhooks, team members, settings. Can restore rule versions. |
| Analyst | Edit access | Edit rules and signals, view analytics, manage connectors. Cannot access Team or Settings pages. |
| Viewer | Read-only | View all pages but cannot make any changes. Edit controls are disabled with a tooltip. |
Inviting a team member
Go to Team Members in the sidebar â click Invite member â enter their name, email, and role. They will receive a Clerk invitation email with a sign-up link. Once they complete sign-up, their role is active immediately.
Rule Builder
Rules override the default scoring engine using IF/THEN logic. When a rule fires, its actions execute immediately â for example, forcing a CRITICAL risk level regardless of the raw score.
Condition types
| Type | Example |
|---|---|
signal | IF ROOTED_DEVICE is present |
absence | IF HAS_SIM_CARD is absent |
score | IF score > 70 |
location | IF location mismatch detected |
device | IF device type matches condition |
Action types
| Type | What it does |
|---|---|
risk | Override risk level (LOW, MEDIUM, HIGH, CRITICAL) |
block | Force a block response |
score | Override the numeric risk score |
webhook | Fire a webhook alert |
skip | Skip further rule evaluation |
Testing a rule
Click âļ Test rule on any rule card to open the rule tester. Select which signals are active, set a risk score using the slider, and click Run test. The result shows pass or fail with a per-condition breakdown explaining exactly why each condition matched or did not.
AI rule generation
Click the Claude AI assistant panel at the bottom of the Rule Builder page. Describe a fraud scenario in plain English â for example, "Block new SIM cards on rooted devices between 2am and 5am". Claude reads your active signals and generates a structured rule automatically. You can review it before applying.
Rule Versioning
Every time a rule is edited or toggled, FraudSense automatically saves a snapshot of the previous state. This gives you a full audit trail and the ability to roll back any change instantly.
How it works
- Up to 10 versions are stored per rule â oldest versions are pruned automatically
- Each version records the rule title, conditions, actions, enabled state, and timestamp
- Click the purple History button on any rule card to open the version drawer
- Only Admins can restore a previous version
Restoring a version
Open the History drawer â find the version you want â click ⊠Restore this version. Before restoring, Studio automatically saves the current state as a new version â so you can always undo a restore if needed.
Publishing Config
Changes you make in Studio â signal weights and score bands â do not affect the fraud API automatically. You need to publish them explicitly using the Publish to API button in the Signal Manager.
What gets published
- All enabled signal names and their current weights
- Score band thresholds (LOW/MEDIUM/HIGH/CRITICAL)
What does NOT need publishing
- Rules â these are evaluated automatically at score time
- Webhook endpoints â these fire based on live scores, no publish needed
FraudSense Developer Docs
Real-time device intelligence and fraud scoring for banks and fintechs. 44 signals, 4 combined patterns, plain English reasons. Integrate in 10 minutes.
On this page
What is FraudSense?
FraudSense is a device intelligence SDK and API that detects fraud at the device level â before transactions are processed. It runs silently inside your React Native app, evaluates 44 signals across 8 categories, and returns a calibrated risk score with confidence labels and plain English reasons.
| Component | Description |
|---|---|
| SDK v1.2.0 | React Native module â 44 signals across device, sensor, location, battery, network, security, behavior, and pattern categories |
| API | REST API that stores device history, enriches with server-side IP intelligence, and returns scored reports |
| Portal | Self-serve dashboard for API key management, usage monitoring, and client analytics |
Signal categories
| Category | Signals | What it detects |
|---|---|---|
| Device | 9 | Emulators, integrity failures, locale/timezone mismatches |
| Security | 3 | Root/jailbreak, proxy interception, emulator detection |
| Network | 5 | VPN, datacenter IPs, carrier country mismatch |
| Behavior | 12 | Bots, credential stuffing, paste attacks, superhuman speed |
| Sensor | 5 | No movement, no orientation change, extreme brightness |
| Location | 3 | GPS spoofing, low accuracy, permission denied |
| Battery | 3 | Always charging, no discharge cycle, device farms |
| Patterns | 4 | Combined automation, location hiding, credential stuffing, device farm |
How it works
// 1. SDK initializes silently at app startup // 2. 7 collectors run in background (device, sensor, location, battery, network, behavior, security) // 3. At a transaction point, your app calls getReport() // 4. RiskEngine evaluates 44 signals â computes score 0â100 // 5. stableScore averages last 3 reports to eliminate first-load spikes // 6. Full report returned with confidence labels + plain English reasons Your App â FraudSense SDK â RiskEngine â Score + Labels + Summary + Patterns
Base URL
https://api.getfraudsense.com
Quick Start
Get from zero to a working risk score in under 10 minutes.
Get your API key
Visit the developer portal â click "Get Free API Key". Your key is generated instantly and starts with fs_live_.
Install the SDK
npm install fraudsense-sdk
npx expo install expo-battery expo-brightness expo-crypto expo-device \ expo-location expo-network expo-screen-orientation \ expo-secure-store expo-sensors
Initialize at app startup
import FraudSense from 'fraudsense-sdk'; await FraudSense.init({ apiKey: 'fs_live_xxxx', endpoint: 'https://api.getfraudsense.com', collectGPS: true, trustedRegion: 'AE', // reduces expat false positives debug: false, });
Score a transaction
// At login, payment, or withdrawal const report = await FraudSense.getReport(); // Use stableScore after 3+ reports (recommended) const level = report.risk.isStable ? report.risk.stableLevel : report.risk.level; if (level === 'CRITICAL') blockTransaction(); if (level === 'HIGH') requireVerification(); if (level === 'MEDIUM') requestOTP(); if (level === 'LOW') allowTransaction(); // Plain English summary for your fraud team console.log(report.risk.summary);
Authentication
Every API call authenticates with your API key.
API Key â SDK and server-to-server calls
Pass your API key in the X-FraudSense-Key header for all risk scoring and event endpoints. Keys passed in the URL are not accepted.
X-FraudSense-Key: fs_live_your_api_key_here
Your account and API key
Create your account in FraudSense Studio. Once your email is verified, Studio creates your workspace on the Free plan and your first API key. Find the key in Studio under SDK Setup. Keys are never sent by email.
Studio is the one login for FraudSense: dashboards, rules, signals and team members are all managed there.
SDK Installation
Requirements
| Requirement | Version |
|---|---|
| React Native | 0.73+ |
| Expo SDK | 54+ |
| Node.js | v20+ |
| iOS | 15+ |
| Android | API 21+ |
Install via npm
npm install fraudsense-sdk
Install peer dependencies
npx expo install expo-battery expo-brightness expo-crypto expo-device \ expo-location expo-network expo-screen-orientation \ expo-secure-store expo-sensors
Add permissions (iOS) â app.json
{
"expo": {
"plugins": [
["expo-location", {
"locationWhenInUsePermission": "Used to verify transaction safety."
}]
]
}
}
Initialization
Call FraudSense.init() once at app startup â ideally on the splash screen before navigating to login.
import FraudSense from 'fraudsense-sdk'; await FraudSense.init({ apiKey: 'fs_live_xxxx', // Required endpoint: 'https://api.getfraudsense.com', // Required collectGPS: true, // Optional â default false trustedRegion: 'AE', // Optional â ISO country code autoFlush: true, // Optional â default true flushInterval: 30000, // Optional â ms, default 30s debug: false, // Optional â console logs appAttest: true, // Optional â iOS, Apple App Attest playIntegrity: { cloudProjectNumber: '1234567890' }, // Optional â Android });
Configuration options
| Option | Type | Default | Description |
|---|---|---|---|
| apiKey | string | â | Your FraudSense API key. Required. |
| endpoint | string | â | API base URL. Required. |
| collectGPS | boolean | false | Request location permission and collect GPS for spoofing detection. |
| trustedRegion | string | â | ISO country code (e.g. "AE"). Reduces false positives for expat-heavy markets where locale and timezone commonly mismatch. |
| autoFlush | boolean | true | Automatically send reports to backend on interval. |
| flushInterval | number | 30000 | Milliseconds between automatic flushes. |
| debug | boolean | false | Print SDK logs to console. Disable in production. |
| appAttest | boolean | false | iOS: prove each scored event came from your genuine app on a genuine iPhone, with a key in the Secure Enclave (Apple App Attest). Needs @expo/app-integrity and a development or store build, not Expo Go. |
| playIntegrity | object | null | Android: { cloudProjectNumber } from Play Console. Each scored event carries Google's verdict on the app and the device (Google Play Integrity). Needs @expo/app-integrity and a build installed from Google Play. |
Behavior Hooks
Wire up these hooks in your components to collect behavioral signals. The more hooks you add, the more accurate the interactionScore becomes.
Tap recording
import BehaviorCollector from 'fraudsense-sdk/collectors/BehaviorCollector'; <TouchableOpacity onPress={(e) => { BehaviorCollector.recordTap(e.nativeEvent.locationX, e.nativeEvent.locationY); handleAction(); }} />
Text change / paste detection
Paste detection works automatically via text length jump analysis â no onPaste prop needed.
<TextInput
onChangeText={(text) => {
BehaviorCollector.recordTextChange('email', text); // auto-detects paste
setEmail(text);
}}
/>
<TextInput
onChangeText={(text) => {
BehaviorCollector.recordTextChange('password', text);
setPassword(text);
}}
/>
Scroll recording
<ScrollView
onScroll={(e) => BehaviorCollector.recordScroll(e.nativeEvent.contentOffset.y)}
scrollEventThrottle={16}
>
Screen transition recording
useEffect(() => {
BehaviorCollector.recordScreenTransition('PaymentScreen');
}, []);
recordTextChange on login fields and recordTap on the submit button. This alone captures credential stuffing and bot patterns reliably.SDK Methods
getReport()
Returns a full risk report for the current session. Use risk.stableScore and risk.stableLevel after 3+ reports for more accurate scoring.
const report = await FraudSense.getReport(); console.log(report.risk.stableScore); // 0â100, averaged over last 3 console.log(report.risk.stableLevel); // LOW / MEDIUM / HIGH / CRITICAL console.log(report.risk.isStable); // true after 3+ reports console.log(report.risk.summary); // plain English verdict console.log(report.risk.triggered); // array of fired signals with reasons console.log(report.risk.patternsDetected); // number of combined patterns fired
getRiskScore()
Returns just the score and level. Lighter than getReport() if you only need the number.
const { score, level, triggered } = await FraudSense.getRiskScore();
getDeviceId()
Returns the stable SHA-256 device fingerprint. Persists via secure storage across sessions.
const deviceId = FraudSense.getDeviceId(); // Returns: "fs_a3f9b2c1d4e5..."
Other methods
| Method | Description |
|---|---|
FraudSense.flush() | Force-send pending report to backend immediately |
FraudSense.pause() | Pause all collectors (e.g. when app goes to background) |
FraudSense.resume() | Resume collectors after pause |
FraudSense.reset() | Clear all local data, session state, and score history |
Event Hooks
Subscribe to real-time events from the SDK using FraudSense.on(). Returns an unsubscribe function.
// Fires when SDK is initialized FraudSense.on('ready', ({ deviceId, version }) => { console.log('SDK ready', deviceId); }); // Fires after every getReport() call FraudSense.on('report', (report) => { setRiskBadge(report.risk.stableLevel); }); // Fires after every flush attempt FraudSense.on('flush', ({ success, response }) => { if (!success) console.warn('Flush failed'); }); // Unsubscribe when component unmounts const unsub = FraudSense.on('report', handler); return () => unsub();
Accounts
Accounts are created and managed in FraudSense Studio, not through this API. The former /v1/auth/register, /v1/auth/login, /v1/auth/verify and password-reset endpoints now return 410 Gone with links to Studio.
Every API call authenticates with your API key in the X-FraudSense-Key header; see Authentication.
Events Endpoint
The SDK automatically posts to this endpoint on every flush. You can also call it directly for server-side integrations.
X-FraudSense-Key header. When using the SDK, this endpoint is called automatically â you do not need to call it directly.Request body
{
"deviceId": "fs_a3f9b2c1...",
"sessionId": "1744123456789",
"deviceProfile": {
"model": "iPhone 17 Pro Max",
"os": "iOS",
"timezone": "Asia/Dubai",
"locale": "en-US",
"isEmulator": false,
"isRooted": false
},
"events": [{
"type": "RISK_REPORT",
"riskScore": 17,
"riskLevel": "LOW",
"triggeredSignals": [],
"fingerprint": "fs_xyz...",
"sdkVersion": "1.2.0",
"timestamp": 1744123456789
}]
}
Apple App Attest on POST /v1/risk/score (iOS, optional)
A scoring request can carry proof, signed in the iPhone's Secure Enclave, that it came from your genuine app on a genuine Apple device. Without it, nothing changes. The FraudSense SDK does all of the steps below for you when you pass appAttest: true to init().
- Attest the app's key once per install:
POST /v1/attest/challenge, thenPOST /v1/attest/verify. - For each scoring request, get a fresh challenge from
POST /v1/attest/challenge(single use, valid 5 minutes). - Sign this exact text with the attested key (
generateAssertion), as the client data followed by the challenge:deviceId,sessionId,eventTypeandriskScore, one per line, using empty lines for fields you do not send. - Send it with the request:
"attestation": { "keyId": "base64 key id from attestation", "challenge": "challenge from /v1/attest/challenge", "assertion": "base64 assertion" }
The response then includes "attestation": { "status": "verified" | "failed" | "unverified" | "not_provided", "reason": "âĻ" }, and attestationBoost when points were added. See Apple App Attest signals in the signal catalogue for what each status does to the score.
Google Play Integrity on POST /v1/risk/score (Android, optional)
The Android counterpart: Google's own verdict on the app and the device, encrypted so the phone cannot read or change it, and bound to this one request. Without it, nothing changes. The FraudSense SDK does this for you when you pass playIntegrity: { cloudProjectNumber } to init().
- Compute the request hash: the SHA-256, as lowercase hex, of
deviceId,sessionId,eventTypeandriskScore, one per line, using empty lines for fields you do not send (the same text App Attest signs). - Ask Google Play for a standard integrity token with that request hash.
- Send it with the request:
"playIntegrity": { "token": "token from Google Play" }
The FraudSense server asks Google to decode the token and checks that it was made for this request and this app, recently, and only once. The response then includes "playIntegrity": { "status": "verified" | "failed" | "unverified" | "not_provided", "reasons": [âĻ], "verdicts": { "app", "device", "licensing", "appsDetected" } }, and playIntegrityBoost when points were added. See Google Play Integrity signals in the signal catalogue. A device that sends no token is scored as before, so for sensitive actions you can write a rule such as "review unless play_integrity_verified".
Device History
curl https://api.getfraudsense.com/v1/risk/history/fs_abc123 \ -H "X-FraudSense-Key: fs_live_xxxx"
API Keys
{"name":"Production Key"}Dashboard
Risk Signal Catalogue
FraudSense v1.2.0 evaluates 44 signals per session across 8 categories. Each signal includes a confidence rating and plain English reason returned in the report.
Device signals (9)
| Signal | Confidence | Points | Reason |
|---|---|---|---|
| missing_device_name | MEDIUM | +8 | Device model name could not be read. Common on emulators or modified devices. |
| outdated_os | MEDIUM | +6 | Device running iOS < 15 or Android < 10. Older OS is more vulnerable to exploits. |
| not_real_device | HIGH | +20 | Device is not a physical device. Strongly indicates an emulator or simulator. |
| device_integrity_fail | HIGH | variable | Hardware profile failed integrity checks. Model and OS combination appears inconsistent. |
| resolution_anomaly | MEDIUM | +12 | Screen resolution does not match expected values for the reported device model. |
| font_scale_anomaly | MEDIUM | +8 | Font scale is set to an unusual value. Automated tools often use non-standard display settings. |
| default_font_scale | LOW | +2 | Font scale at factory default 1.0. Most real users adjust this over time. |
| locale_timezone_mismatch | LOW | +2â5 | Device language does not match timezone. Common among expats but also seen on spoofed devices. Reduced to +2 when trustedRegion is set. |
| region_ip_mismatch | MEDIUM | +3â10 | Device region setting does not match IP address country. May indicate VPN or location spoofing. Reduced to +3 when IP matches trustedRegion. |
Security signals (3)
| Signal | Confidence | Points | Reason |
|---|---|---|---|
| emulator_detected | HIGH | +15â25 | Device shows strong signs of being an emulator or simulator. Score scales with confidence level. |
| rooted_or_jailbroken | HIGH | +25 | Device appears to be rooted or jailbroken. Security controls may be bypassed. |
| proxy_active | HIGH | +15 | HTTP proxy is active on this device. Traffic may be intercepted or manipulated. |
Network signals (5)
| Signal | Confidence | Points | Reason |
|---|---|---|---|
| vpn_detected | MEDIUM | +8â20 | VPN or proxy network detected. Score scales with confidence (0â1). Legitimate users use VPNs too. |
| carrier_country_mismatch | HIGH | +10 | SIM card country does not match IP address country. Strong indicator of VPN or location spoofing. |
| datacenter_ip | HIGH | +12 | Request is coming from a datacenter or cloud server IP. Indicates automated or server-side activity. |
| ip_lookup_blocked | LOW | +3 | IP geolocation lookup failed while connected. May indicate network filtering or proxy. |
| no_connection | LOW | +3 | Device has no internet connection. Score may be incomplete. |
Behavior signals (12)
| Signal | Confidence | Points | Reason |
|---|---|---|---|
| bot_like_behavior | HIGH | +25 | Interaction patterns highly consistent with automated bot activity. interactionScore < 20. |
| suspicious_behavior | MEDIUM | +12 | Interaction patterns show some signs of automated behavior. interactionScore 20â40. |
| human_behavior_confirmed | MEDIUM | -5 | Trust signal. Interaction patterns consistent with a real human. interactionScore >= 70. |
| superhuman_tap_speed | HIGH | +15 | Taps occurring faster than humanly possible (< 100ms apart). Strong indicator of automated input. |
| low_tap_entropy | MEDIUM | +10 | All taps hitting the same screen location. Bots typically tap the exact same pixel. |
| screen_transition_too_fast | HIGH | +15 | Screens changing faster than a human can read them (< 500ms per screen). Indicates scripted navigation. |
| session_too_short | MEDIUM | +10 | Entire session completed in under 5 seconds. Too fast for normal human interaction. |
| paste_on_login_fields | MEDIUM | +15 | Email or password was pasted rather than typed. Common pattern in credential stuffing attacks. |
| multi_field_paste | MEDIUM | +10 | Multiple fields filled via paste. Automated tools often paste pre-filled credentials. |
| paste_on_payment_field | LOW | +8 | Payment amount or note was pasted. Could be normal behaviour or automated transaction. |
| excessive_paste | MEDIUM | +10 | Unusually high number of paste events detected (3+) across the session. |
| default_font_scale_on_emulator | HIGH | +5 | Default font scale combined with emulator signals. Consistent with automated test environments. |
Sensor signals (5)
| Signal | Confidence | Points | Reason |
|---|---|---|---|
| no_accelerometer_data | HIGH | +10 | No accelerometer data collected. Real devices always have motion sensors active. |
| zero_device_movement | MEDIUM | +8 | Device showed no physical movement. Bots and emulators typically show zero motion. |
| minimal_device_movement | LOW | +4 | Very low physical movement detected. Device may be stationary or automated. |
| no_orientation_change | LOW | +5 | Screen was never rotated during the session. Could indicate automated or scripted usage. |
| extreme_brightness | LOW | +5 | Screen brightness locked at 0% or 100%. Automated tools often ignore display settings. |
Location signals (3)
| Signal | Confidence | Points | Reason |
|---|---|---|---|
| location_denied | LOW | +5 | Location permission was denied. Reduces available trust signals. |
| low_location_accuracy | LOW | +5 | GPS accuracy is very low (> 500m). Could indicate indoor use or spoofing. |
| gps_spoofing_detected | HIGH | +25 | Device moved at an impossible speed between GPS readings (> 900 km/h). Strong GPS spoofing indicator. |
Battery signals (3)
| Signal | Confidence | Points | Reason |
|---|---|---|---|
| critically_low_battery | LOW | +4 | Battery below 5%. Unusual for a device actively making transactions. |
| always_charging | MEDIUM | +8 | Device is always plugged in. Common in device farms running automated scripts. |
| no_battery_cycle | MEDIUM | +5 | No charge/discharge cycle detected after 20+ readings. Device may be permanently connected to power. |
Apple App Attest signals (3, iOS, server-side)
Decided by the FraudSense server from an App Attest assertion sent with POST /v1/risk/score, never by the device. Sent only when the request carries an attestation object; requests without one are scored exactly as before.
| Signal | Confidence | Points | Reason |
|---|---|---|---|
| app_attest_failed | HIGH | +40 | The assertion was checked and is false: forged signature, a different app, a replayed counter, or a request changed after the device signed it. HIGH on its own, CRITICAL with any other warning sign. |
| app_attest_unverified | LOW | 0 | An assertion was sent but could not be checked for a reason that is not evidence of tampering (expired or reused challenge, key not attested). Shown so your rules can act on it. |
| app_attest_verified | Trust signal | 0 | Genuine app on a genuine Apple device, bound to this exact request. Listed under trustSignals. Does not lower the score: a real app on a real phone can still be used by a fraudster. |
Google Play Integrity signals (6, Android, server-side)
Decided by the FraudSense server from Google's verdict on a Play Integrity token sent with POST /v1/risk/score, never by the device. Present only when the request carries a playIntegrity object; requests without one are scored exactly as before.
| Signal | Confidence | Points | Reason |
|---|---|---|---|
| play_integrity_failed | HIGH | +40 | The request or the app is not genuine: Google rejected the token, the token was made for a different request or app, or Google does not recognise this build of the app (repackaged or modified). |
| play_integrity_device_failed | HIGH | +40 | Google says the device fails its integrity check: rooted, unlocked bootloader, emulator, or a hooking tool. Unlike the SDK's own root check, the device cannot hide this. |
| play_integrity_remote_control_app | MEDIUM | +20 | An app not installed from Google Play is capturing the screen or controlling the device: the pattern behind screen-sharing "bank support" scams. |
| play_integrity_unlicensed | LOW | 0 | The app was not installed from Google Play (sideloaded). Not fraud by itself; shown so your rules can act on it. |
| play_integrity_unverified | LOW | 0 | A token was sent but could not be checked for a reason that is not evidence of tampering (Google unreachable, token too old or already used, app not evaluated by Google, a Play Console test response). |
| play_integrity_verified | Trust signal | 0 | Genuine app from Google Play on a genuine Android device, bound to this exact request. Listed under trustSignals. Does not lower the score. |
Combined Pattern Detection
Beyond individual signals, FraudSense detects 4 combined attack patterns. Patterns fire when multiple correlated signals appear together â they carry extra weight because combinations are far more reliable than single signals.
| Pattern | Confidence | Points | Triggers when |
|---|---|---|---|
| automation_pattern | HIGH | +10 | 2+ of: zero_device_movement, minimal_device_movement, session_too_short, no_accelerometer_data |
| location_hiding_pattern | HIGH | +12 | 2+ of: vpn_detected, locale_timezone_mismatch, region_ip_mismatch, carrier_country_mismatch |
| credential_stuffing_pattern | HIGH | +15 | 2+ of: paste_on_login_fields, multi_field_paste, bot_like_behavior, suspicious_behavior |
| device_farm_pattern | MEDIUM | +12 | 2+ of: always_charging, no_battery_cycle, zero_device_movement, no_orientation_change |
credential_stuffing_pattern should always result in at least a step-up authentication challenge regardless of the total score. The pattern alone is a strong fraud indicator.Risk Labels
High-level labels explain why a device scored HIGH â more actionable than a raw score alone. Returned in risk.byCategory and the risk.summary field.
| Category | Signals involved | Recommended action |
|---|---|---|
| Fake device | emulator_detected, not_real_device, device_integrity_fail | Block immediately |
| Tampered device | rooted_or_jailbroken, proxy_active | Block or require biometric |
| Location spoofing | gps_spoofing_detected, location_hiding_pattern | Block on payment/withdrawal |
| Device farm | device_farm_pattern, always_charging, no_battery_cycle | Flag account for review |
| Bot behavior | bot_like_behavior, automation_pattern, superhuman_tap_speed | Require CAPTCHA or OTP |
| Credential stuffing | credential_stuffing_pattern, paste_on_login_fields | Force password reset |
| Suspicious network | vpn_detected, datacenter_ip, carrier_country_mismatch | Step-up on financial actions |
| Identity mismatch | locale_timezone_mismatch, region_ip_mismatch | Monitor â low confidence alone |
Response Format
Risk levels
| Score | Level | Recommendation |
|---|---|---|
| 0 â 24 | LOW | Allow â proceed normally |
| 25 â 49 | MEDIUM | Step-up â request OTP or biometric |
| 50 â 74 | HIGH | Block â require manual review |
| 75 â 100 | CRITICAL | Block and flag â escalate immediately |
Risk object schema (v1.2.0)
| Field | Type | Description |
|---|---|---|
| score | integer | Raw composite risk score 0â100 |
| level | string | LOW / MEDIUM / HIGH / CRITICAL based on raw score |
| stableScore | integer | Average of last 3 scores â smooths first-load spikes |
| stableLevel | string | Level based on stableScore â use this for decisions |
| isStable | boolean | True after 3+ reports have been generated |
| summary | string | Plain English verdict for fraud teams |
| triggered | array | All fired signals with signal name, points, confidence, and reason |
| byCategory | object | Triggered signals grouped by category |
| signalCount | integer | Total number of signals that fired |
| highConfidenceSignals | integer | Number of HIGH confidence signals that fired |
| patternsDetected | integer | Number of combined patterns that fired |
| version | string | RiskEngine version used for scoring |
Triggered signal object
| Field | Type | Description |
|---|---|---|
| signal | string | Signal identifier e.g. "paste_on_login_fields" |
| points | integer | Points added to score (negative = trust signal) |
| category | string | device / sensor / location / battery / network / security / behavior / pattern |
| confidence | string | HIGH / MEDIUM / LOW |
| reason | string | Plain English explanation for fraud teams |
| detail | string | Optional technical detail e.g. "locale:en-US tz:Asia/Dubai" |
IP Intelligence
Collected automatically via ipapi.co on every session. No extra configuration needed.
| Field | Type | Description |
|---|---|---|
| ip | string | Client IP address |
| ipCountry | string | ISO country code (e.g. AE, SA) |
| ipCity | string | City name |
| ipOrg | string | ISP or organization name |
| ipIsDatacenter | boolean | True if IP belongs to a cloud/datacenter provider |
| isVPN | boolean | True if VPN confidence >= 0.35 |
| vpnConfidence | number | 0.0â1.0 VPN likelihood score |
| carrierCountryMismatch | boolean | True if SIM country differs from IP country |
Device History
Every device that calls the API gets a persistent history record. Accessible via /v1/risk/history/:deviceId.
| Field | Type | Description |
|---|---|---|
| totalSessions | integer | Total number of sessions for this device |
| highRiskCount | integer | Sessions scored HIGH or CRITICAL |
| firstSeenAt | string | When this device was first seen |
| lastSeenAt | string | Most recent session timestamp |
| isNewDevice | boolean | True if this is the first session for this device |
Status Codes
| Code | Meaning | Action |
|---|---|---|
| 200 | Success | Process the response normally |
| 400 | Bad request | Check required fields â deviceId and sessionId are always required |
| 401 | Unauthorized | Check your API key â must be in the X-FraudSense-Key header |
| 403 | Forbidden | Account suspended â contact support |
| 404 | Not found | Check the endpoint URL |
| 429 | Rate limited | Slow down requests â max 1,000/15 min |
| 500 | Server error | Retry after a short delay |
Changelog
SDK v1.2.0 â April 2026
- Signal count expanded from 18 to 44 signals across 8 categories
- Added SecurityCollector â emulator detection with confidence score, root/jailbreak heuristics, proxy detection
- Added 4 combined pattern detectors â automation, location hiding, credential stuffing, device farm
- Added confidence labels (HIGH/MEDIUM/LOW) and plain English reasons per signal
- Added stableScore â averages last 3 reports to eliminate first-load spikes
- Added trustedRegion config â reduces expat false positives for UAE and MENA markets
- Added summary field â plain English verdict for fraud teams
- Added byCategory â signals grouped by category for easier client integration
- Added paste detection via text length jump analysis (no onPaste prop required)
- Added device integrity scoring â model vs OS cross-validation
- Added locale vs timezone mismatch signal
- Added region vs IP country mismatch signal
- Improved VPN detection â confidence score 0â1 instead of boolean, cross-checks carrier country vs IP country
- Improved NetworkCollector â live IP intelligence via ipapi.co (country, city, org, datacenter flag)
- Fixed battery level comparison (was checking 0â1 float, now correctly checks 0â100 integer)
- Fixed all collector export issues â added collect() method to SensorCollector, BatteryCollector, LocationCollector
- Fixed locale/timezone collection via getLocales()/getCalendars() for newer Expo versions
SDK v1.1.0 â April 2026
- Initial public release on npm as fraudsense-sdk
- 6 collectors: Device, Sensor, Location, Battery, Network, Behavior
- 18 signals in RiskEngine
- SHA-256 device fingerprinting via expo-secure-store
- Singleton pattern throughout SDK
API v1.0.0 â March 2026
- Initial launch at api.getfraudsense.com
- JWT authentication, email verification, API key management
- Free tier â 1,000 calls/month
- Admin panel with suspend/activate/email/usage controls
- AI chatbot (Claude Haiku) for developer support
- /demo interactive fraud scenarios
- Railway deployment with PostgreSQL and Prisma
Support
Contact
Email: support@getfraudsense.com
GitHub Issues: github.com/getfraudsense/fraudsense-api
Before reaching out
- Check the Status Codes section for common errors
- Verify your API key is active in the developer portal
- Make sure
deviceIdandsessionIdare included in every request - For SDK issues, enable
debug: trueand check console logs - Use the AI chatbot on the portal for instant answers