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

      Login Flow

      Paytm Mini Programs platform requires merchant to mandatorily integrate the login flow for Mini Programs. Essentially meaning merchant can not have a manual sign-in process for the user. For the same whenever in mini program flow user credentials are needed call the paytmFetchAuthCode JS API to get the required details. Paytm will show a popup where users can explicitly provide their consent to proceed with the flow.

      The flow for the same works like this:

      1. User clicks on merchant's Mini Program Icon and lands into the landing page.
      2. User browses the catalogue/ adds items to their cart.
      3. When user details are required call paytmFetchAuthCode JS APIand post user consent, login the user seamlessly.
      4. Once the user is logged into merchant's system, they should manage their session by dropping/managing a secure HTTPS cookie so that there is no need of the authentication steps each time the user opens the mini program.
      Please Note: User cosent being a mandatory step, if the user disallows the consent, then merchant needs to gracefully handle it by first showing a screen that educates the user about this mandatory step and then prompting the consent again and if the user still disallows, then exit him out of their Mini App, back to the Paytm App. If user accepets the consent, then the consent screen will not be prompted again to the same user next time, merchant can seamlessly access user details to facilitate login.

      Integrating Login flow in Mini Programs involves below steps:-

      1. Calling paytmFetchAuthCode JS API at client end
      2. Calling getAccessToken API S2S to getAuthToken
      3. Calling getUserInfo API S2S to get user details of Paytm users