• Callback Response
  • Getting Started
    • Mobile Integration (Android/IOS)
      Enterprise Solutions
      Retail Solutions
      Accept Payments
      Process Payments
      API References
      Other links
      Mini Program Platform
  • Features for Investments PG
  • Payment Flow

    You can leverage Paytm’s best in class Payment Gateway in your Mini Program. For the same we leverage the App Invoke Flow

    The flow for the same works like this:

    1. User adds items to your cart and clicks on Proceeds to Pay
    2. User is then shown a popout of Paytm PG right within Paytm App, where all configured payment modes are visible.
    3. User completes payment and is landed back seamlessly to your Mini Program.
    1. Once the user has clicked the pay button the merchant app backend server should call the Initiate Transaction API

      Note: callbackUrl in Initiate Transaction API is mandatory in case of Mini Programs PG flow. Merchant during Initiate Transaction API can either use the default callbackURL(https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=#OrderId# where #OrderId# is actual OrderId used for initating transaction) or pass their custom URL . Please ensure that the custom URL should not throw any network error and should be secured by SSL layer.
    2. The checksum parameter to be passed during the Initiate Transaction call can be created using the Paytm checksum library

    3. The merchant app server will get a Transaction Token from Paytm server.

    4. Third-party apps need to call the payment JS API with the required following payload.

      amount : Amount to be charged/deducted from the user

      orderId : Generated by the Merchant app server

      txnToken : The merchant app server gets this token from PG backend

      mid : Unique MID provided by Paytm

    5. Paytm processes the transaction with the user’s bank and returns transaction response to your App.

    6. You call the Transaction Status API to verify the transaction response

    7. Notify the payment status to user and proceed with the order/service fulfilment.