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

      PaytmPushWindow JS API

      Use Case


      PaytmPushWindow is used to push a new window to show new page with a transition animation. It adds a page to the stack and can be launched with custom startup params. PaytmPushWindow will Open the url page will not close the existing page, pay attention to open the number, do not open too much to affect performance. It is recommended that the same application PaytmPushWindow level should not exceed 5 layers, otherwise it will affect the user experience and may cause the application to crash .


      Request Attributes

      Content format: JSON

      ParameterDescriptionRequiredExample Value
      urlURL to be opened in new windowYeshttps://paytm.com
      param.showTitleBarTitle Bar of the windowNotrue
      param.pullRefreshTo on refresh on pullNotrue
      param.defaultTitleDefault titleNoWelcome

      List of Supported Parameters(param in Request Attributes)

      Sr.No.NameTypeDescriptionDefaultsComments
      1defaultTitleStringThe default title, displayed on the title bar before the page is first loaded""Set this property to have a title if not included in the application code. If a title is defined in the application code, It will override the mentioned title mentioned in this property(A change of title will be visible to user on page load).
      2showLoadingBoolWhether to display the global chrysanthemum before the page is loadedFALSEWhether to display the global chrysanthemum before the page content is fully loaded, during which the user is prevented from operating the page. **Warning: the chrysanthemum continues until the first screen network request is completely finished**
      3readTitleBoolWhether to read the page title displayed on the titleBarTRUESet this to false and use with defaultTitle to add your custom title on runtime.
      4pullRefreshBoolWhether to support pull-down refreshFALSEWorks only if canPullDown is True. Does not work in iOS.
      5canPullDownBoolWhether the page supports drop-downTRUEUse only if it fits your UX. If the view is long, This property can cause uncertain UX issues while scrolling.
      6showTitleLoadingBoolWhether to display a small chrysanthemum to the left of the title of the TitleBarFALSE
      7showProgressBoolShows a progress line for to provide a UX for loadingTRUEThe progress line will be visible below the titlebar when the page is being loaded. In case of no titlebar, The progress line will still be visible on the top.

      Response Attributes

      Success:

      ParameterDescriptionExample Value
      dataBooleantrue

      Error Responses:

      ParameterDescriptionExample Value
      errorError2
      messageError messageInvalid parameter

      ERROR CODES

      codeDescription
      2Invalid parameter


      Request CodeResponse JSON
      
                  const requestObject={
                          url: 'https://paytm.com',
                          param: {
                            showTitleBar: false,
                            pullRefresh: true,
                            defaultTitle: "Welcome!"
                       }
                  }
                  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('paytmPushWindow',requestObject) });