(species:
Description: This method is used to create an instance of PhonePe. This method runs asynchronously and it is very fast. This instance is used for any calls to PhonePe's bridges.
Promise<PhonePeSDK>
Parameters
Parameter Name | Type | Description |
---|---|---|
species | string | Describes if the merchant is using the sdk for web or react native. Can be either Constants.Species.native or Constants.Species.web |
operatingSystem | string | The operatingSystem that the SDK is running on. Can be either Constants.OS.ios or Constants.OS.android |
Usage:
import {PhonePe, Constants} from 'phonepesdk'
let operatingSystem = Constants.OS.ios //or Constants.OS.android
let sdk = await PhonePe.build(Constants.Species.native, operatingSystem)