Create PhonePeSDK instance

build

(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.

Response Parameter

Promise<PhonePeSDK>

Parameters

Parameter NameTypeDescription
speciesstringDescribes if the merchant is using the sdk for web or react native.
Can be either Constants.Species.native or Constants.Species.web
operatingSystemstringThe 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)