Fraud ID Generation - Android

📘

DEUNA Android SDK 2.12.3 or higher is required.


The app MUST use Android Gradle Plugin (AGP) version 8.5.1 or above. This is necessary to support Android 16 KB page sizes.

Use the generateFraudId function or the fraudCredentials parameter to generate a DEUNA fraud payload using supported antifraud providers.

Only add the providers you plan to use.

Supported providers

RISKIFIED

Required: storeDomain

In your app/build.gradle file:

dependencies {
    implementation("com.riskified:android-sdk:1.11.0:nogoogle@aar")
}

Example:

deunaSDK.generateFraudId(
    context = context,
    params = mapOf(
        "RISKIFIED" to mapOf(
            "storeDomain" to "yourdomain.com"
        )
    )
) { fraudId ->
    // fraudId: Base64 JSON string (or null)
}

CYBERSOURCE

Required: orgId, merchantId Optional: fpServer (default: h.online-metrix.net)

In your app/build.gradle file, add Cybersource AAR files to your app (for example app/libs) and include:

dependencies {
    implementation(fileTree(mapOf("dir" to "libs/cybersource", "include" to listOf("*.aar"))))
}

Example:

deunaSDK.generateFraudId(
    context = context,
    params = mapOf(
        "CYBERSOURCE" to mapOf(
            "orgId" to "your_org_id",
            "merchantId" to "your_merchant_id"
            // "fpServer" optional, default: "h.online-metrix.net"
        )
    )
) { fraudId ->
    // fraudId: Base64 JSON string (or null)
}

SIGNIFYD

Required: orgId Optional: fpServer (default: imgs.signifyd.com)

In your app/build.gradle file, add Signifyd AAR files to your app (for example app/libs) and include:

dependencies {
    implementation(fileTree(mapOf("dir" to "libs/signifyd", "include" to listOf("*.aar"))))
}

Example:

deunaSDK.generateFraudId(
    context = context,
    params = mapOf(
        "SIGNIFYD" to mapOf(
            "orgId" to "your_org_id"
            // "fpServer" optional, default: "imgs.signifyd.com"
        )
    )
) { fraudId ->
    // fraudId: Base64 JSON string (or null)
}
⚠️

Cybersource and Signifyd cannot be used together in the same app.

Both providers are powered by the ThreatMetrix SDK from LexisNexis Risk, but they ship different, incompatible variants:

ProviderPackage namespaceAARs
Cybersourcecom.lexisnexisrisk.threatmetrix.rl.*TMXProfiling-rl-x.x.aar
Signifydcom.lexisnexisrisk.threatmetrix.*TMXProfiling-x.x.aar

Linking both AARs at the same time causes compile-time conflicts — both variants include overlapping class definitions that the Android build system cannot resolve.

Use only one: add either the Cybersource AARs or the Signifyd AARs to your app — never both.


ACCERTIFY

Optional: locationConsent (default: true), phoneConsent (default: true)

In your app/build.gradle file, add the Accertify AAR files (both inmobile-x.x.x.aar and inmobile-common-x.x.x.aar) to your app (for example app/libs/accertify) and include:

dependencies {
    implementation(fileTree(mapOf("dir" to "libs/accertify", "include" to listOf("*.aar"))))
    
    // Accertify required transitive dependencies
    implementation("io.insert-koin:koin-core:3.5.6")
    implementation("androidx.biometric:biometric:1.1.0")
    implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
}

Configuration Files (Assets)

🔑

Server Keys

The server_keys_message_hosted.json file and the values needed for inmobile.properties (such as the accountGuid and the registerUrl/logUrl endpoints) are unique to your merchant account and must be requested directly from your Accertify onboarding representative.

You must place two configuration files in your application's src/main/assets/ directory:

  1. server_keys_message_hosted.json: The public encryption keys file provided by Accertify.
  2. inmobile.properties: A configuration file containing your specific Account GUID and Endpoint URLs:
registerUrl=YOUR_INMOBILE_ENDPOINT_URL
logUrl=YOUR_INMOBILE_ENDPOINT_URL
accountGuid=YOUR_ACCOUNT_GUID
serverKeysMessage=server_keys_message_hosted.json

Example:

deunaSDK.generateFraudId(
    context = context,
    params = mapOf(
        "ACCERTIFY" to mapOf(
            "locationConsent" to true, // Optional, default: true
            "phoneConsent" to false      // Optional, default: true
        )
    )
) { fraudId ->
    // fraudId: Base64 JSON string (or null)
}

Call generateFraudId — full example

deunaSDK.generateFraudId(
    context = context,
    params = mapOf(
        "RISKIFIED" to mapOf(
            "storeDomain" to "yourdomain.com"
        ),
        "ACCERTIFY" to mapOf(
            "locationConsent" to true,
            "phoneConsent" to false
        )
    )
) { fraudId ->
    // fraudId: Base64 JSON string (or null)
}

Pass fraud credentials to a widget (Optional)

Pass the fraud provider configuration directly to the widget via fraudCredentials. The SDK will generate the fraud ID internally and send it to DEUNA at purchase time — no need to call generateFraudId separately.

PaymentWidgetConfiguration(
    sdkInstance = deunaSDK,
    orderToken = "...",
    callbacks = PaymentWidgetCallbacks().apply { ... },
    fraudCredentials = mapOf(
        "RISKIFIED" to mapOf(
            "storeDomain" to "yourdomain.com"
        ),
        "ACCERTIFY" to mapOf(
            "locationConsent" to true,
            "phoneConsent" to false
        )
    )
)

Behavior notes

  • Unknown providers are ignored.
  • Invalid provider config is ignored.
  • If no valid providers are sent, callback returns null.
  • The SDK runs provider initialization in parallel (best effort) and returns a Base64 JSON payload for valid requested providers.