SDK Documentation
v2.0.1 Postman
SDK

Web SDK Documentation

Unaport provides a unified Web SDK for seamless integration with web and mobile applications (via WebView). A single SDK works across all supported Account Aggregators — with full UI customization to match your brand.

🌟
Customizable UI

Adaptable color scheme and font to match your FIU brand completely.

🔌
Effortless Integration

Plug-and-play setup — no need to manage the AA process flow or individual AA APIs.

Seamless Consent Management

Direct consent creation and approval without redirecting users to external AA apps.

🌎

SDK Endpoints

UAThttps://sdk.sandbox.unaport.com/view
LIVEhttps://sdk.premium.unaport.com/view

Load the SDK via WebView or as an iframe with the config appended as a query parameter:

URL Pattern
https://sdk.sandbox.unaport.com/view?config={base64-encoded-config-json}

🔄

Process Flow

1
Generate Access Token

Call the Login API with your credentials to get access_token and refresh_token.

2
Build SDK Config JSON

Assemble the configuration object with all required fields (phone number, FIU ID, tokens, theme).

3
Base64-Encode the Config

Convert the JSON to a Base64-encoded string using base64encode.org or server-side encoding.

4
Redirect or Embed

Redirect the user or load the SDK URL as an iframe: <sdk-endpoint>/view?config=<encoded-string>

5
User Selects Bank & Approves Consent

The SDK handles bank selection, AA OTP, account discovery, bank OTP linking, and consent approval — entirely within your app.

6
Receive Data Notification

After data is fetched, Unaport sends a data notification to your FIU server with the sessionId.

7
Fetch Data

Call Fetch Data by Session API with the sessionId in JSON or Excel format.


SDK Configuration Parameters

FieldReqTypeDescription
phoneNumberMString10-digit mobile number (without country code)
trackingIdMStringYour tracking reference for the consent request
fiuIdMStringFIU ID as registered in Sahamati
accessTokenMStringAccess token from the Login API
refreshTokenMStringRefresh token from the Login API
themeMJSONUI color configuration — see Color Fields below
FITypeOStringFilter FIPs by type: Deposits | Insurance | GST | Investment
productIdMStringProduct (consent template) ID
Color Configuration Fields
FieldReqDescription
backgroundMMain background color (Hex)
accentMAccent/highlight color (Hex)
primaryMPrimary color (Hex)
primaryTextMPrimary text color
primaryButtonTextMButton text color
secondaryMSecondary background color
secondaryTextMSecondary text color
disabledMDisabled element background
disabledTextMDisabled element text color
borderMBorder color
hintTextMPlaceholder/hint text color
errorTextMError message color
loaderColorMLoading indicator color
fontNameMFont family name (e.g. "Open Sans")
failureColorMFailure state color

📄

Sample Configuration JSON

Plaintext JSON (before Base64 encoding)
{
  "theme": {
    "background": "#131313",
    "accent": "#1B1B1B",
    "primary": "#7762FF",
    "primaryText": "#FFFFFF",
    "primaryButtonText": "131313",
    "secondary": "#C589E4",
    "secondaryText": "#F2F2F2",
    "disabled": "#1F1F1F",
    "disabledText": "#FEFEFE",
    "border": "#767676",
    "hintText": "#9e9e9e",
    "errorText": "#d32f2f",
    "loaderColor": "#F2F2F2",
    "fontName": "Open Sans",
    "failureColor": "#d32f2f"
  },
  "productId": "5961868f-ac0e-45e6-9e7b-394c535fa4cc",
  "phoneNumber": "9812345678",
  "trackingId": "your-unique-tracking-id",
  "fiuId": "UNACORES-FIU-UAT",
  "FIType": "Deposits",
  "accessToken": "eyJhbGciOiJSUzI1NiIsIn...",
  "refreshToken": "eyJhbGciOiJIUzI1NiIsIn..."
}
Never expose your accessToken or refreshToken in client-side code. Generate the encoded config server-side and pass only the final URL to the client.

📷

Product View — Theme Samples

The SDK UI is fully customizable. Below are two example themes showing the complete 5-screen consent flow — from bank selection through to exit.

Theme Sample 1 Dark UI with purple accent
Select Banks
1Select Banks
Enter AA OTP
2Enter AA OTP
Enter Bank OTP
3Enter Bank OTP
Approve Consent
4Approve Consent
Exit
5Exit
Theme Sample 2 Light UI with brand accent
Select Banks
1Select Banks
Enter AA OTP
2Enter AA OTP
Enter Bank OTP
3Enter Bank OTP
Approve Consent
4Approve Consent
Exit
5Exit