Scgateway Flutter plugin.

Minimum Versions

androidminSdkVersion 21
iosios 11.0

Getting Started

Add this to your package's pubspec.yaml file:

  scgateway_flutter_plugin: ^1.0.0

From the terminal: Run

flutter pub get

Android setup

add these lines in AndroidManifest.xml in the main <application /> tag

<activity android:name="com.smallcase.gateway.screens.transaction.activity.TransactionProcessActivity">
    <action android:name="android.intent.action.VIEW" />

    <category android:name="android.intent.category.BROWSABLE" />
    <category android:name="android.intent.category.DEFAULT" />
      android:scheme="scgateway" />

Replace "{YOUR_HOST_NAME}" with unique host name which is given to every integration partners.

Flutter interface

The plugin exports all its methods with one default import. Import it using

import 'package:{scgateway_flutter_plugin}/scgateway_flutter_plugin.dart';

Setting up sdk for a transaction.

To start using gateway setup the gateway with the desired configuration by calling setConfigEnvironment method which is available as a static method of ScgatewayFlutterPlugin class.

ScgatewayFlutterPlugin.setConfigEnvironment(enviroment, gateway_name, leprechaun_mode, isAmoEnabled)

Params : environment - (Required) This defines the Url environment to which all the gateway apis would point to.

ScgatewayFlutterPlugin.GatewayEnvironment {

gateway_name - (Required) This is a unique name given to every gateway consumer. leprechaun_mode-(Optional) For Testing purpose pass it as true else false. isAmoEnabled-(Optional) For Testing purpose pass it as true else false.

User Initialisation

User initialization starts a session between the distributor and the gateway. Whenever there is a change in user session.


Params : authToken - (Required) JWT with the information of user signed using a shared secret between smallcase API and gateway backend.

Trigger Transaction

To start a transaction call triggerGatewayTransaction method which is available as a static method of ScgatewayFlutterPlugin class.


Params : transactionId - (Required) Transaction id to create a the transaction.

NOTE TransactionId creation process remains same using Gateway backend APIs. Read more about transaction Id at Creating Transactions

Lead Gen

To trigger lead gen call triggerLeadGen method which is available as a static method on ScgatewayFlutterPlugin class.

 ScgatewayFlutterPlugin.leadGen(name, email, contact, pincode);

Params : name: (Optional) Nname ff the User. email: (Optional) Email of the User. contact: (Optional) Contact number of the User. pinCode: (Optional) PIN code of the User.