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)
})
})
Capabilities | Desciption |
---|---|
Seek Permission | Ask permission for location, camera etc from users |
Location | Get location of the Switch user |
File Picker | Uploading the file from the merchant App. |
Key-Value Storage | Merchant can use the feature to store and fetch the data inside the PhonePe Switch webview. |
Camera / QR code scanner | To fetch and read an image inside Switch. |
Video Calling | To enable the capability, please connect with PhonePe integration team |
Download PDF | To 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.
Updated over 1 year ago