Mobile SDKs
KLP SDKs open the loyalty experience inside your app through a secure WebView and handle session, token, real-time notifications (SSE) and event logging for you.
| Platform | Package | Guide |
|---|---|---|
| iOS | KLPSDK (Swift Package Manager / CocoaPods) | iOS |
| Android | com.klp.sdk (Gradle) | Android |
| React Native | @kaizen-dev-team/rn-sdk | React Native |
| Flutter | klp_flutter_sdk | Flutter |
React Native and Flutter packages are bridges over the native iOS and Android SDKs, so the
same concepts — initialize, session, launch(path), events — apply on every platform.
How it works
- Initialize and identify the user — Initialize the SDK at app launch, then register the logged-in user after authentication. The SDK stores the session securely, opens a real-time connection, and attaches authenticated headers to all platform requests.
- Send behavioral data — Report in-app actions such as login, purchases, transfers, or page views through the SDK's event API. The platform evaluates active campaigns and rules against these events.
- Deliver the loyalty experience — Open the loyalty screen, or embed it as a component in your own UI. Rewards earned inside the WebView are forwarded back to your app through SDK callbacks.
- Return effects in real time — When rules match, the platform pushes effects back over a persistent connection: loyalty points, mission progress, level progress, and related updates. The SDK can show a built-in notification UI, or your app can handle the presentation itself.
Core concepts
Applications
An application is the digital environment where your loyalty program runs. It defines currency, timezone, campaign set, and business rules. Each mobile SDK connects to this environment through secure authentication — user tokens, device/session headers, and transport security — rather than exposing raw API credentials in app code.
Campaigns
Campaigns define your promotion and engagement strategy inside an application. Each campaign has a schedule, usage limits, and one or more rules that determine when effects are triggered.
Rules
Rules are the logic layer of a campaign. A rule consists of conditions (criteria that must be met) and effects (actions applied when conditions are satisfied). For example:
If the customer completes a money transfer, award 50 loyalty points and advance the "Active Trader" mission.
Events
Events are the primary input from your app to the platform. You send them through the SDK with an event name and optional attributes. Event names and attribute keys must align with your platform configuration and backend contract.
Effects
When a rule's conditions are met, the platform returns one or more effects. Common effect types include:
- Loyalty points — award points to the user
- Mission progress — advance a gamification mission
- Level progress — move the user toward the next tier or level
Effects can be delivered immediately over the real-time channel, or surfaced when the user opens the loyalty WebView.
Example scenario
Imagine a mobile banking or trading app that wants to increase engagement with two promotions:
- Mission: Complete 5 trades in a month → earn 500 loyalty points
- Level boost: Log in 10 days in a row → advance to the next loyalty tier
The SDK flow:
- User logs in — Your app registers the user with the SDK. The SDK starts the real-time connection and prepares secure headers for WebView and API calls.
- User performs actions in the host app — On trade completion, your app sends a
MoneyTransferevent with relevant attributes (e.g. quantity). On login, it sends aLogInevent. - The platform evaluates rules — For a user with 5 completed trades, the mission condition is met. For a user with 10 consecutive logins, the level condition is met.
- Effects are delivered back to the app — The platform pushes point awards and mission/level progress updates. Your app can use the SDK's default notification UI or render its own.
- User opens the loyalty screen — The SDK opens the hosted loyalty WebView where users browse rewards, campaigns, and missions. Deep links from the WebView can route back into native screens in your app.
What the SDK provides
| Capability | Description |
|---|---|
| Initialization & session | Secure SDK bootstrap and user session lifecycle (login / logout) |
| Event logging | Fire-and-forget event API to trigger platform rules from native app flows |
| Secure WebView | Hosted loyalty UI, full screen or embedded in your own screens, with domain validation and transport security |
| Real-time notifications | Live delivery of points, missions, and level updates without polling |
| Simulation mode | Optional separate WebView for sandboxed or virtual experiences |
| Deep linking | WebView → native navigation back into your app |
| Security | Device integrity checks, secure token storage, certificate pinning, and challenge-based auth |
The core SDKs ship no banners, cards or other embeddable UI components — those belong to your app's own design. Platform-specific setup, API signatures, and customization options are in each platform guide.