SDK Interface API

Payments SDK has been structured so that it exposes a limited set of generic APIs which cover the entire structure of the constantly changing payments ecosystem. This enables the consumption of new features seamlessly and with very minimal changes.

Android

An instance of HyperServices should be created with a fragment activity instance and a viewgroup instance as its parameters.

HyperServices hyperInstance  = new HyperServices(fragmentActivity, viewgroup);
var hyperInstance: HyperServices = HyperServices(fragmentActivity, viewgroup)

iOS

An instance of Hyper should be created before making any API calls.

let hyperInstance = HyperServices()
HyperServices *hyperInstance = [HyperServices new];

React Native

Exposed APIs

type HyperSdkReactType = {
  preFetch(data: string): void;
  createHyperServices(): void;
  initiate(data: string): void;
  process(data: string): void;
  terminate(): void;
  onBackPressed(): boolean;
  isNull(): boolean;
  isInitialised(): Promise<boolean>;
};
const { HyperSdkReact } = NativeModules;
export default HyperSdkReact as HyperSdkReactType;
import HyperSdkReact from 'hyper-sdk-react';

Create HyperServices Object

This method creates an instance of HyperServices class in the React Bridge Module on which all the HyperSDK APIs / methods are triggered. It internally uses the current activity as an argument.

Note: This method is mandatory and is required to call any other subsequent methods from HyperSDK.

HyperSdkReact.createHyperServices();

🚧

All api’s are triggered on an instance of HyperServices.

SDK interfaces


What’s Next