For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs. Agents can also search and read this documentation through its MCP server.
Skip to content

Kotlin

Kotlin Banking Mobile SDK Integration Guide

Overview

The Banking vertical is delivered through the Engine Mobile SDK for Android. This guide covers installation, prerequisites, the core configuration props (channel, zone, productTypes), a basic usage example, query parameters, client tags, and event handlers.

You'll need the correct channel and zone values for your integration. Ask your Partner Manager to provide these values for Banking.

Requirements

  • Android project built with Gradle

  • minSdk 24 or higher

Install

The SDK is published to GitHub Packages, so a GitHub Personal Access Token (PAT) is required to download it.

1. Create a GitHub PAT

In GitHub, go to Settings → Developer settings → Personal access tokens and create a token with at least the read:packages scope. When authenticating, use your GitHub username and the PAT as the password (not your GitHub login password).

2. Store credentials outside the repo

Either store them user-level in ~/.gradle/gradle.properties:

gpr.user=YOUR_GITHUB_USERNAME
gpr.token=YOUR_GITHUB_PAT

or as environment variables:

3. Add the GitHub Packages repository

Add the maven block inside dependencyResolutionManagement.repositories in settings.gradle.kts:

4. Add the dependency

Add this line inside dependencies { ... } in app/build.gradle.kts.

5. Sync / verify

Confirm com.engine.mobile.sdk:kotlin-engine-sdk resolves to the latest 1.x release in the tree.

Initialize

Import the SDK where you render the Banking flow:

Basic Example

EngineSDK extends FrameLayout, so construct it in code and add it to any container. Use listOf(ProductType.savings) for productTypes to render the Banking flow. Your channel and zone values are provided by your Partner Manager.

Properties

Prop
Type
Required
Description

channel

String

Yes

Identifies your integration in Engine. Provided by your Partner Manager (e.g. "direct").

zone

String

Yes

Identifies the placement or distribution surface for the SDK. Provided by your Partner Manager (e.g. "banking").

productTypes

List<ProductType>

Yes

Product flow(s) to render. ProductType is imported from the Engine SDK package — use listOf(ProductType.savings) for Banking, which maps to the string value "savings".

clientTags

Map<String, List<String>>

No

Arbitrary key/value tags for reporting and attribution. See Client Tags below.

queryParams

Map<String, String>

No

Query parameters appended to the Banking experience. Supported key: zip. See Query Parameters below.

onExit

(ExitEvent) -> Unit

Yes

Fired when the user exits the flow.

onInitialize, onCreate, onRateTableRender, onOfferClick, onErrorPageView, onErrorPageRetry, onEmbedError, onEmbedErrorRetry

Callbacks

No

Optional tracking hooks. See Event Handlers below.

Query Parameters

queryParams is a Map<String, String> of parameters appended to the Banking experience the SDK loads.

Supported Keys

Key
Type
Description

zip

String

5-digit US ZIP code. Preselects the user's location.

Example

Client Tags

The Engine SDK supports adding your unique Client Tags to track performance of specific campaigns or users. All Client Tag data is attributed to the lead level.

Client Tags are added via the clientTags argument on EngineSDK, a map of string keys to lists of string values. We strongly recommend including only one element per list for ease of reporting and attribution — if you want two separate tags, include the second tag under a different key. There is no limit to the number of keys.

Supported Client Tag Keys for Reporting

If you plan for the Engine team to set up reporting (i.e., you do not plan to hit the Analytics API), these are the only keys that are currently fully supported. If a different key is needed, please reach out to your partner manager.

  • agentId

  • campaignId

  • clientId

  • deviceid

  • medium

  • sourceId

  • subid

  • subid1

  • subid2

  • subid3

  • target

  • trafficsource

  • userid

Event Handlers

EngineSDK exposes optional callback arguments that notify your app when key moments occur during the user's journey. Each callback receives an event object containing a timestamp (ISO 8601 UTC) and event-specific fields.

All callbacks are optional except onExit. Pass any combination when constructing EngineSDK. If a callback is not provided, the SDK will still log the event to the debug console in development mode.

Available Events

For Banking, onRateTableRender populates bankingOffers, and onOfferClick carries leadUuid, offerUuid, financialInstitutionName, financialInstitutionUuid, productType, and productSubType.

Callback
Event Type
Trigger

onInitialize

InitializeEvent

SDK finished loading the embed

onCreate

CreateEvent

New lead created

onRateTableRender

RateTableRenderEvent

Rate table displayed with offers

onOfferClick

OfferClickEvent

User clicked an offer

onErrorPageView

ErrorPageViewEvent

Error page displayed in the flow

onErrorPageRetry

ErrorPageRetryEvent

User retried from the error page

onExit

ExitEvent

User exited the SDK

onEmbedError

EmbedErrorEvent

Web embed failed to load

onEmbedErrorRetry

EmbedErrorRetryEvent

User retried after embed failure

Every event includes a timestamp (ISO 8601 UTC). All other fields are optional and may be null or absent.

onInitialize

Fired once, when the SDK finishes loading the embedded experience for the first time.

Field
Type
Description

timestamp

String

ISO 8601 UTC timestamp of when the event was emitted

onCreate

Fired when a new lead is created.

Field
Type
Description

timestamp

String

ISO 8601 UTC timestamp of when the event was emitted

leadUuid

String

Unique identifier for the newly created lead

createPage

String

The page where the lead was created. Always explore

onRateTableRender

Fired when the rate table is rendered with offers.

Field
Type
Description

timestamp

String

ISO 8601 UTC timestamp of when the event was emitted

rateTableUuid

String

Unique identifier for the Engine rate table

bankingOffers

List

Array of banking offers returned for the lead

onOfferClick

Fired when the user clicks an offer in the rate table.

Field
Type
Description

timestamp

String

ISO 8601 UTC timestamp of when the event was emitted

leadUuid

String

Unique identifier for the lead

offerUuid

String

Unique identifier for the clicked offer

financialInstitutionName

String

Name of the institution offering the account (e.g. Example Bank)

financialInstitutionUuid

String

Unique identifier for the institution

productType

String

Type of product (e.g. savings)

productSubType

String

Account product sub-type (e.g. savings_account)

onErrorPageView

Fired when the error page is displayed within the embedded flow. This is different from onEmbedError, which fires when the embedded experience itself fails to load.

Field
Type
Description

timestamp

String

ISO 8601 UTC timestamp of when the event was emitted

leadUuid

String

Unique identifier for the lead

fromPage

String

The page the user was on before the error. Always explore

onErrorPageRetry

Fired when the user taps "Retry" on the error page within the embedded flow.

Field
Type
Description

timestamp

String

ISO 8601 UTC timestamp of when the event was emitted

leadUuid

String

Unique identifier for the lead

toPage

String

The page the user is retrying to navigate to. Always explore

onExit

Fired when the user dismisses the SDK.

Field
Type
Description

timestamp

String

ISO 8601 UTC timestamp of when the event was emitted

onEmbedError

Fired when the embedded experience fails to load (network error, or an HTTP status of 400 or above). The SDK then shows an error screen with "Retry" and "Close" options.

Field
Type
Description

timestamp

String

ISO 8601 UTC timestamp of when the event was emitted

errorMessage

String

Description of the error that occurred

onEmbedErrorRetry

Fired when the user taps "Retry" on the SDK's error screen after a load failure.

Field
Type
Description

timestamp

String

ISO 8601 UTC timestamp of when the event was emitted

errorMessage

String

Description of the original error that triggered the retry

Signing process

The Kotlin SDK is signed with a GPG key (ECDSA, nistp384) when it is released. A detached .asc signature file is published alongside each of its artifacts in GitHub Packages. This lets you confirm that the artifact was produced by Engine and has not been tampered with.

Verifying the artifact

  1. Fetch the public key and add it to your keyring:

Confirm the key is now in your keyring:

This should show the public key details.

  1. Download both the artifact ({file}.aar) and its signature ({file}.aar.asc) from the GitHub Packages page.

  2. Verify the signature against the artifact:

You should see Good signature, confirming the artifact is authentic and intact.

Changelog

View the full Kotlin Banking SDK changelog

1.4.0 (2026-11-11)

  • Add new product vertical support

1.3.0 (2026-11-03)

  • Updated how the SDK identifies its delivery method when loading the hosted experience

1.2.0 (2026-10-20)

  • Improve type definition

  • If you imported com.engine.mobile.sdk.CreateEvent directly, import com.engine.mobile.sdk.events.CreateEvent instead

1.1.1 (2026-09-29)

  • Improve type definition

1.1.0 (2026-09-15)

  • Made channel and zone required properties for SDK initialization.

1.0.1 (2026-08-18)

  • Fixed external browser links to open correctly on Android devices

1.0.0 (2026-08-03)

  • Initial release of the Kotlin Engine SDK.

Last updated

Was this helpful?