For the complete documentation index, see llms.txt. This page is also available as Markdown.

Credit Cards

Flutter Credit Cards Mobile SDK Integration Guide

Overview

This documentation covers installation, required prerequisites, configuration properties currently surfaced (channel, zone), the prefill props supported for the Credit Cards product type, and a basic usage example.

Setup Instructions

You’ll need the correct channel and zone values for your integration. Ask your Partner Manager to provide these values for Flutter Credit Cards.

Step 1: Request an API Token

Before you can use the Engine SDK, you'll need to request an API token from your Partner Manager. This token is used to authenticate with the Engine API and provides access to different financial institutions. You may want to use multiple API tokens depending on how many entry points your app has into the SDK.

Step 2: Confirm Software Requirements

  • Flutter 3.0.0 or higher

  • Dart 3.10.7 or higher

Step 3: Install the SDK

Install the SDK via pub get:

flutter pub add engine_mobile_flutter_sdk

Note: This installs the latest compatible SDK version. For a specific version, pin it explicitly in pubspec.yaml.

Step 4: Initialize the SDK

In your app, initialize the SDK by adding the following imports to any Dart file where you want to use it. The second import exposes the prefill data models (imported with the engine prefix to avoid name collisions with Flutter):

Basic Example

Place the EngineSDK widget anywhere in your widget tree to render the Credit Cards flow.

Properties

Pass these properties to EngineSDK:

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. 'marketplace').

productTypes

List<ProductType>

Yes

Product flow(s) to render. Use [engine.ProductType.creditCard] for Credit Cards.

bearerToken

String

For prefill

API token from your Partner Manager. Required to use the Prefill API (the prefill props below). Without it, the standard non-prefilled flow renders.

personalInformation

LeadPersonalInformation

No

Prefill data (see Prefilling Lead Data below).

financialInformation

LeadFinancialInformation

No

Prefill data (see Prefilling Lead Data below).

creditInformation

LeadCreditInformationJson

No

Prefill data (see Prefilling Lead Data below).

creditCardInformation

LeadCreditCardInformationJson

No

Prefill data (see Prefilling Lead Data below).

clientTags

Map<String, List<String>>

No

Arbitrary key/value tags for reporting and attribution.

onExit

OnExitCallback

Yes

Fired when the user exits the flow.

onInitialize, onCreate, onUpdate, onNavigate, onSubmit, onRateTableRender, onOfferClick, onErrorPageView, onErrorPageRetry, onEmbedError, onEmbedErrorRetry

Callbacks

No

Optional tracking hooks. See the Event Handlers page.

User Experience Demo

The SDK renders a complete Credit Cards journey inside your app. It collects any missing user inputs, submits the lead, and then displays offers.

Typical flow:

  1. Landing screen

  2. Personal details form

  3. Offer results

Landing Screen
Personal Details
Personal Details
Personal Details
Personal Details
Personal Details

Prefilling Lead Data

This section describes how to prefill any user data you already have into your Flutter Credit Cards SDK implementation. Prefilled data is grouped into typed information classes and passed directly as props on EngineSDK. These models come from the api_models.dart import (aliased as engine).

Prefilling requires a bearerToken. Pass only the fields you have — omitted fields are collected from the user in-flow.

Example

Type Definitions

The information classes accept the following fields for Credit Cards (all fields optional):

Enums / Accepted Values

Fields backed by an enum must use one of the predefined values:

Client Tags for Reporting

The Engine Flutter 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 can be added by including a clientTags attribute at the top level of the EngineSDK widget, where the value is a Map<String, List<String>>.

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 in the clientTags map

Example

Note: Client Tags are only sent as part of a prefill request. You must provide both a bearerToken and prefill data (via the information-class props such as personalInformation). If no prefill data is supplied, the SDK makes no prefill call and any clientTags you pass are ignored.

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—we may be able to accommodate, but adding nonstandard keys will increase the time it takes Engine to report Client Tag values back to you and is therefore not recommended.

  • agentId

  • campaignId

  • clientId

  • deviceid

  • medium

  • sourceId

  • subid

  • subid1

  • subid2

  • subid3

  • target

  • trafficsource

  • userid

See the GET Lead Client Tags endpoint for information on attributing lead analytics to your own client tags, if you decide to hit the Analytics API for reporting.

Event Handlers Implementation

Event Handlers

Last updated

Was this helpful?