React Native
Welcome to the Offer Carousel React Native SDK Integration Guide
This guide walks you through the process of integrating the Offer Carousel SDK into your React Native application. By using this SDK, you can easily connect to Engine by MoneyLion’s financial network, authenticate with the Engine API, and give your users access to a wide range of financial products.
What’s Covered in This Guide
Software Requirements: Prerequisites for Integrating the SDK
Installation & Initialization: How to get started quickly
Customization Options: Tailor the experience to match your app’s theme and branding
Event Handling & Error Handling: Track SDK activity in real time and handle failures gracefully
Setup Instructions
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 subAccountToken is used to authenticate with the Engine API and provides access to different financial institutions. If you’re looking to have multiple instances of an offer carousel, leverage unique tokens per instance for distinct tracking and offer control.
Along with your unique subAccount token, you will receive a channel and zone value which is also required to define each unique instance of your SDK embed.
Optionally, your Partner Manager can generate a searchAPIToken on your behalf to enable you to control which product types appear in each offer carousel instance.
Step 2: Confirm Software Requirements
Requirements:
React Native version >= 0.59.0
Node.js >= 18
TypeScript (optional but recommended)
Package Size:
SDK Bundle Size: 1.62 MB Unpacked
Step 3: Install the SDK
Install the SDK from npm using the command using your package manager, e.g.
npm install @moneylion/react-native-offer-carouselyarn add @moneylion/react-native-offer-carousel
👉 Refer to our NPM readme to set up and run the example app: https://www.npmjs.com/package/@moneylion/react-native-offer-carousel
Step 4: Initialize the SDK
In your app, you’ll need to initialize the SDK by rendering the Offer Carousel React component. You would need to pass in the required properties to see your entitled static offers. Refer to the “Offer Carousel SDK Properties” section below.
To implement the Offer Carousel SDK into your app, render the MoneyLionOfferCarousel component with the required properties. Here is a complete example:
Lead IP Address is captured automatically by the SDK from the user's device; you do not need to pass this field in your integration.
Adding Client Tags for Reporting
The Engine Mobile 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 request body, where the value is an array of strings. We strongly recommend only including one element per array for ease of reporting/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 object.
Example
Here is a sample code snippet of how you might implement the Mobile SDK into your app, with sample clientTags appended:
See our GET Lead Client Tags endpoint for information on attributing lead analytics to your own client tags, if you decide to hit our Analytics API for reporting.
Supported Client Tag Keys
If you plan for the Engine team to set up reporting (i.e. you do not plan to hit our 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
Prefilling Lead Data
The prefilledData object should be structured with any fields you want the user not to have to answer themselves, if you already have that info available. Here is an example of prefilledData as a Javascript Object. You may prefill as many of these fields as desired; the only 3 required are firstName, lastName, and email.
Prefilled values cannot be edited by the user on the final confirm-details screen (before submitting the form). If the user's info is incorrect (e.g. Address is incorrect outdated), the user should edit the info in your app directly.
Example React Native Implementation
Here is a sample code snippet of how you might implement the Mobile SDK into your app, with all prefilledData fields populated:
For any of these fields, DO NOT prefill any fields that are empty or otherwise unavailable. If you do not have info for a particular field available to prefill, omit that field in your prefilledDataobject.
For example, this is incorrect:
This is correct:
PrefilledData Type Validations
The data should follow a type schema, described here in Typescript notation:
Enums/Accepted Values for Certain Fields
Certain fields, although strings, must be within a predetermined list of accepted values. Here are those values:
PrefilledData Sanitization
Prefilled Data must align with the type validations above, and any fields with an accepted value enum must be within that enum. If you (the partner) prefill user data, and any type/value is invalid, that attribute will be stripped, and the lead will have to enter it again manually.
UI Customizations
Fonts and Colors
To maintain brand consistency within your app experience, the Offer Carousel SDK supports font and color customization with the following requirements:
Fonts:
Any custom fonts must be pre-installed in the host application (ie the partner’s app).
For example, if Partner ABC wants to use a custom font, that font must already be supported and linked within their hosted app.
The SDK will reference fonts by name via the
fontFamilyproperty.
Colors:
The SDK supports the full range of hex color codes, consistent with what’s supported in the Payload platform across partner pages, embeds, and SDKs.
Ideally, partners should use an existing brand configuration (if one has been set up previously).
Alternatively, partners can provide their preferred hex codes, and we will apply them during setup.This includes all standard 16 million+ hex color values, like those found in this HTML color picker.
Branding
We manage branding for your Offer Carousel SDK by creating a unique brand for each partner, applied consistently across all carousels. The brand's color palette defines its visual style, with theme colors generated to match and establish the application's overall look and feel.
Color Palette: A Brand's Palette defines the colors and style used in our experiences.
Note: any colors not defined will be generated such that they align with the colors provided.
Theme Colors: The theme colors are used to define the look and feel of the application. The colors can be generated using the colors provided in the color palette above.
SDK Properties for Customization
The SDK provides the following properties to customize the appearance of the component:
isDarkTheme
By setting this property, you can configure the SDK to match your app’s theme.

showProductTypeLabel:
This property controls the visibility of the offer type on top of the offer card.

showCardBorder:
Improve visibility of the offer cards by making them more distinct from the background. This is particularly useful when the container's background color is similar to the offer card's background color.


fontFamily:
This property updates the fonts used by the offer carousel. By default, the SDK will use system fonts.


All SDK Properties
channel
string
Yes
-
The distribution channel identifier
"direct"
zone
string
Yes
-
The zone identifier for offer targeting
"marketplace"
subAccountToken
string
Yes
-
Unique token to fetch relevant offers
"eyJhbG..."
searchAPIToken
string
No
-
Token for the search API
"search_token_xyz"
productType
string
No
-
Specific product type to filter offers
DebtSettlement
CreditBuilderLoan
CashAdvance
EarnedWageAccess
query
string
No
-
Search query for filtering offers. Note: This Make sure to get searchAPIToken before using this prop.
"credit cards"
tags
string
No
-
Custom tags for offer filtering. Each item must be prefixed with tag.
"tag.tag1=value1&tag.tag2=value2"
fontFamily
Partial<FontFamily>
No
Fallbacks to system font
Custom font family configuration. Make sure the fonts are properly installed in your app.
{
regular: "Roboto-Regular",
medium: "Roboto-Medium",
bold: "Roboto-Bold"
}
showCardBorder
boolean
No
false
Show a border around the offer cards
true
showDescriptionPoints
boolean
No
true
Display the offer description as bullet points
false
title
string
No
-
Custom title for the carousel
"Featured Offers"
subtitle
string
No
-
Custom subtitle for the carousel
"Personalized for you"
isDarkTheme
boolean
No
false
Enable dark theme mode.
true
showProductTypeLabel
boolean
No
false
Whether to display product type labels
true
fallbackUI
React.ReactNode
No
-
Custom UI to show on error
<ErrorComponent />
Event Handlers for Real-Time Tracking in the Offer Carousel Mobile SDK
The Engine Offer Carousel SDK has multiple real-time Event Handlers so you can track activity in the SDK in real time.
onLoad
(numOffers: number) => void
No
Called when offers are loaded. Make sure to use the callback value to show the appropriate UI.
(count) => console.log(${count} offers loaded)
onInitialize
(props: onInitializeProps) => void onInitializeProps { timestamp: string; }
No
Called when the SDK is initialized.
(props) => console.log(props)
onRateTableSubmit
(props: onRateTableSubmitProps) => void
onRateTableSubmitProps { timestamp: string;
productTypes: string[];
resultType: ResultType;
defaultProductType: string; }
No
Called when a rate table submission is made.
(props) => console.log(props)
onRateTableResponse
(props: onRateTableResponseProps) => void onRateTableResponseProps { timestamp: string;
isError: boolean;
offers: BaseOffer[];
rateTableUuid: string;
leadUuid: string; }
No
Called when a response for a rate table is received.
(props) => console.log(props)
onOfferDisplayInViewport
(props: onOfferDisplayInViewportProps) => void onOfferDisplayInViewportProps {
timestamp: string;
offerUuid: string;
rateTableUuid: string;
leadUuid: string;
offer: BaseOffer;
offerIndex: number;
context: "horizontal_scroll" | "vertical_scroll";
}
No
Called when an offer is displayed in the viewport.
(props) => console.log(props)
onOfferClick
(props: onOfferClickProps) => void
onOfferClickProps {
timestamp: string;
offerUuid: string;
rateTableUuid: string;
leadUuid: string;
offer: BaseOffer;
offerIndex: number;
context: "horizontal_scroll" | "vertical_scroll" | "offer_details";
}
No
Called when an offer is clicked.
(props) => console.log(props)
onOfferDetailsPageOpen
(props: onOfferDetailsPageOpenProps) => void
onOfferDetailsPageOpenProps {
timestamp: string;
offerUuid: string;
rateTableUuid: string;
leadUuid: string;
offer: BaseOffer;
offerIndex: number;
context: "horizontal_scroll" | "vertical_scroll";
}
No
Called when the offer details page is opened.
(props) => console.log(props)
onOfferDetailsPageClose
(props: onOfferDetailsPageCloseProps) => void
onOfferDetailsPageCloseProps {
timestamp: string;
offerUuid: string;
rateTableUuid: string;
leadUuid: string;
offer: BaseOffer;
offerIndex: number;
}
No
Called when the offer details page is closed.
(props) => console.log(props)
onError
(error: MoneyLionOfferCarouselError) => void MoneyLionOfferCarouselError {
code: ErrorCodes;
severity: "warning" | "error";
message: string;
timestamp: string;
sdkVersion: string;
error?: Error | unknown;
statusCode?: number;
additionalInfo?: Record<string, unknown>;
}
No
Called when an error occurs.
{
code: “NETWORK_REQUEST_ERROR”, message: “Failed to fetch offers for product types", timestamp:”2025-07-24T10:12:02.492Z", error: Error: 400, version: “1.7.3”, statusCode: 400, additionalInfo: { context: ... } }
Error Handling
The SDK provides a comprehensive onError callback to manage various issues. This callback is invoked for configuration errors, network errors, flow errors, and potential UI errors. The coverage of errors includes the following, each with a corresponding error code:
For configuration and server errors, the onError callback returns a statusCode representing the HTTP error response.
additionalInfo contains additional information that is relevant to the error that occured. Some examples of what information it could contain:
`channel` (string) - Configuration channel identifier
`zone` (string) - Configuration zone identifier
`query` (string) - Search query string
`Context` (object) - Configuration context object containing brand, subaccount, signals, etc.
`pageDataParams` (object) - Parameters used to fetch page data including `productType`, `query`, `tags`, etc.
`pageData` - Result object containing fetched page data (offers), including `leadUuid`,
rateTableUuid`, etc.
`productTypes` (string[]) - Array of product type strings
`customClientTags` (Record<string, string[]>) - Custom client tags as key-value pairs
`payload` (object) - Request payload object for API requests
To provide a fallback UI in case of failure, you can utilize the fallbackUI property to pass in a custom React component. Note that this will only show when there’s some error in rendering logic. API errors should be handled by the onError callback.
Changelog
View the full React Native Offer Carousel SDK changelog
2.1.1 (2026-07-28)
Updated styling for the "See All" button in the offer carousel component
Migrated offer carousel to use a more performant endpoint for fetching offer data
2.1.0 (2026-07-21)
Upgraded build tooling to support latest React Native features and improvements
Added error code handling for scenarios where no loan offers are available
2.0.0 (2026-07-07)
Replaced deprecated React Native
SafeAreaViewusage withreact-native-safe-area-contextto align with the current React Native recommendations and improve compatibilityAdded
react-native-safe-area-contextas a required peer dependencyFixed an issue where horizontally scrolling offers did not always trigger viewport detection correctly
1.11.1 (2026-06-09)
Improved app responsiveness by replacing deprecated animation scheduling with modern frame-based timing
1.11.0 (2026-06-02)
Updated the offer carousel component to use an improved markdown rendering library
1.10.2 (2026-05-19)
Reduced bundle size through dependency cleanup and import optimization.
1.10.1 (2026-04-21)
Improved type definitions
1.10.0 (2026-04-14)
Updated behavior to return region-specific error codes for users outside the United States
Standardized error handling by introducing a consistent error code mapping and deprecating the existing error enum
Removed a deprecated dependency to address security vulnerabilities and improve stability
1.9.1 (31 Mar 2026)
Removed
queryandsearchApiTokenpropsDeprecated EWS search endpoint
Removed third-party search functionality
1.9.0 (25 Mar 2026)
Moved
react-native-svgto peer dependencies (required version:>=15.11.0 <16)Removed the
VideosCardcomponentRemoved the
ThumbsUpIconcomponent fromBaseOfferCard
Last updated
Was this helpful?