• Getting Started
    • Mobile Integration (Android/IOS)
      Enterprise Solutions
      Retail Solutions
      Accept Payments
      Process Payments
      Disbursals
      API References
      Testing
      Refunds
      Guides
      Other Processes
      Mini Program Platform

      openInBrowser JS API

      Use Case


      openInBrowser is used to download any file in Mini Program by passing the control to mobile browser eg. PDF.


      Note: openInBrowser currently not supported in UAT app.

      Request Attributes

      Content format: JSON

      ParameterDescriptionRequiredExample Value
      urlURL of the file to downloadYeshttps://dummyurl.pdf

      Response Attributes

      Success:

      ParameterDescriptionExample Value
      successBooleantrue


      Request CodeResponse JSON
      
                  const requestObject={
                          url: 'https://dummyurl.pdf',
                  }
                  function ready (callback) {
                       // call if jsbridge is injected
                      if(window.JSBridge) {
                         callback && callback();
                        } else{
                          // listen to jsbridge ready event
                          document.addEventListener('JSBridgeReady', callback, false);
                 }}
      ready(function () {   JSBridge.call('openInBrowser',requestObject) });