Device Capabilities

A Switch merchant can call few client-side methods to avail the below-mentioned capabilities by importing a JS SDK at the client-side. The JS SDK can be imported using the npm package as mentioned here.

How to create a PhonePe instance can be found here.

// Create instance of SDK to call the client side methods. 

PhonePe.PhonePe.build(PhonePe.Constants.Species.web).then((sdk) => {
    sdk.methodName(attributes).then((res) => {
        console.log("Data " + res)
        alert(res)
    }).catch((err) => {
        console.log("Error " + err)
        alert(err)
    })
})
CapabilitiesDesciption
Seek PermissionAsk permission for location, camera etc from users
LocationGet location of the Switch user
File PickerUploading the file from the merchant App.
Key-Value StorageMerchant can use the feature to store and fetch the data inside the PhonePe Switch webview.
Camera / QR code scannerTo fetch and read an image inside Switch.
Video CallingTo enable the capability, please connect with PhonePe integration team
Download PDFTo enable the capability, please connect with PhonePe integration team

📘

Note

The methods will work only inside the PhonePe application. How to test inside the PhonePe App can be found here.