search

Additional API

Paytm provides you additional JS APIs to "bridge" the gap between native and web app (e.g geolocation, contacts, gallery, camera, permission).

 

Note: This is an optional integration for your specific requirements. However, we recommend you to integrate these JS APIs to enhance user experience wherever required

 

The list of JS APIs currently supported are given below:

 

S.NO JS API FUNCTIONALITY
1. paytmPushWindow paytmPushWindow is used to push a new window to show new page. It adds a page to the stack and can be launched with custom startup params.
2. popWindow popWindow is used to close the current page. Can be called to exit the AppContainer.
3. openInBrowser openInBrowser is used to download any file in Mini Apps by passing the control to mobile browser eg. PDF.
4. checkJSAPI JSApi usability judgment
5. paytmCheckPermission Checks if permissions are granted/denied.
6. paytmRequestPermission A bridge that requests permissions from users.
7. paytmOpenGallery Use the bridge below to open a custom image picker on iOS/Android, and get a callback once the user has picked an image or has cancelled
8. paytmCaptureImageFromCamera This bridge when invoked (assuming that camera permissions are already granted), opens the camera, and once the user clicks a picture, passes data to the web context.