secure_emi_sdk 0.0.7 copy "secure_emi_sdk: ^0.0.7" to clipboard
secure_emi_sdk: ^0.0.7 copied to clipboard

SecureEMI Flutter Plugin bridges Flutter apps with the SecureEMI Android SDK to enable EMI mandates, KYC verification, and installment management.

Secure EMI SDK #

A Flutter plugin that provides bindings to the SecureEMI Android SDK, enabling EMI mandates, KYC verification, and installment management in Flutter applications.

Status #

Proprietary SDK — not open source. All rights reserved.

Features #

  • User Registration - Register users with the SecureEMI platform
  • KYC Verification - Complete Know Your Customer verification flow
  • KYC Status Tracking - Check and monitor KYC verification status
  • Theme Customization - Customize the UI appearance with your brand colors

Requirements #

Platform Minimum Version
Flutter 3.3.0+
Dart 3.9.2+
Android SDK 24+ (Android 7.0)
iOS Not yet supported

Installation #

1. Add Dependency #

Add the plugin to your pubspec.yaml:

dependencies:
  secure_emi_sdk: ^0.0.7

2. Configure AWS CodeArtifact Authentication #

The SecureEMI Android SDK is hosted on AWS CodeArtifact. You need to set up authentication:

export CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token \
  --domain secureemi \
  --profile SecureEMIClient \
  --query authorizationToken \
  --output text)

For CI/CD pipelines, store this token securely in your secret manager.

3. Run Flutter Pub Get #

flutter pub get

Usage #

Initialize the SDK #

Initialize the SDK before using any other methods. This should be done once, typically in your app's initialization:

import 'package:secure_emi_sdk/secure_emi_sdk.dart';

final secureEmi = SecureEmi();

await secureEmi.init(
  SdkConfig(
    clientId: 'your-client-id',
    debug: true, // Set to false in production
  ),
  null, // Optional theme
);

Register User #

Register a user with the SecureEMI platform:

final success = await secureEmi.registerUser(
  RegisterUser(
    firstName: 'John',
    lastName: 'Doe',
    mobile: '9999999999',
    email: 'john@example.com',
  ),
);

if (success == true) {
  print('User registered successfully');
}

Start KYC Verification #

Initiate the KYC verification flow:

await secureEmi.startKyc(
  KycInput(requestId: 'unique-request-id'),
);

Check KYC Status #

Retrieve the current KYC verification status:

final result = await secureEmi.getKycStatus();

if (result is KycSuccess) {
  switch (result.status) {
    case UserKycStatus.pending:
      print('KYC is pending');
      break;
    case UserKycStatus.submitted:
      print('KYC submitted, under review');
      break;
    case UserKycStatus.success:
      print('KYC completed successfully');
      break;
    case UserKycStatus.failed:
      print('KYC verification failed');
      break;
    case UserKycStatus.additionalDocRequired:
      print('Additional documents required');
      break;
  }
} else if (result is KycFailure) {
  if (result.error is NetworkError) {
    print('Network error occurred');
  } else if (result.error is ApiError) {
    print('API error: ${(result.error as ApiError).message}');
  } else if (result.error is InvalidResponse) {
    print('Invalid response from server');
  }
}

Custom Theme #

Customize the KYC UI appearance:

final theme = KycTheme(
  primaryColor: '#007AFF',
  onPrimaryColor: '#FFFFFF',
  backgroundColor: '#F5F5F5',
  onBackgroundColor: '#000000',
  textColor: '#333333',
  secondaryTextColor: '#666666',
  buttonColor: '#007AFF',
  buttonTextColor: '#FFFFFF',
);

await secureEmi.init(
  SdkConfig(clientId: 'your-client-id'),
  theme,
);

API Reference #

SecureEmi #

Method Description
init(SdkConfig config, KycTheme? theme) Initialize the SDK with configuration and optional theme
registerUser(RegisterUser userInput) Register a user with the platform
startKyc(KycInput kycInput) Start the KYC verification flow
getKycStatus() Get the current KYC status
getPlatformVersion() Get the platform version string

Models #

SdkConfig

Property Type Required Description
clientId String Yes Your client ID for authentication
debug bool No Enable debug mode (default: false)

RegisterUser

Property Type Required Description
firstName String Yes User's first name
lastName String Yes User's last name
mobile String Yes User's mobile number
email String Yes User's email address

KycInput

Property Type Required Description
requestId String Yes Unique request identifier

KycTheme

Property Type Description
primaryColor String Primary theme color (hex format)
onPrimaryColor String Text color on primary
backgroundColor String Background color
onBackgroundColor String Text color on background
textColor String Main text color
secondaryTextColor String Secondary text color
buttonColor String Button background color
buttonTextColor String Button text color

UserKycStatus

Value Description
pending KYC not yet submitted
submitted KYC submitted and under review
success KYC completed successfully
failed KYC verification failed
additionalDocRequired Additional documents needed

Error Types #

Type Description
NetworkError Network connectivity issue
ApiError API returned an error (includes message)
InvalidResponse Invalid response from server

Example #

See the example directory for a complete sample application.

Platform Support #

Platform Status
Android Supported
iOS Stub implementation only

License #

Proprietary. All rights reserved. See LICENSE for details.

Support #

For support, contact SecureEMI.

2
likes
140
points
448
downloads

Publisher

unverified uploader

Weekly Downloads

SecureEMI Flutter Plugin bridges Flutter apps with the SecureEMI Android SDK to enable EMI mandates, KYC verification, and installment management.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on secure_emi_sdk

Packages that implement secure_emi_sdk