search

Payment Flow

You can leverage Paytm’s best in class Payment Gateway in your Mini Apps. 

The Payment flow for Mini Apps 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 Apps.

payment flow

Note: Note: callbackUrl in Initiate Transaction API is mandatory in case of Mini Apps 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.

Integrating Payment flow in Mini Apps involves the following steps:

  1. Once the user has clicked the pay button the merchant app backend server should call the Initiate Transaction API
  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.
  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.
  8. For information on how to handle refunds, please refer to the refund flow present here.

Note: Our additional payment solutions (Subscription, Pre-authorized and investment) are available only to the enterprise customers. Kindly get in touch with the integration team for implementation of these.