search

EMI Integration

This page explains how you can integrate the EMI payment source in the custom checkout solution to collect the total amount payable from your customer in easy installments. Users can select EMI option offered by different banks partnered with Paytm as their payment source to complete the payment. On this page, you will only see the integration steps required for the Standard EMI offering. In case you plan to offer EMI subvention to your customers, please refer to the Integration document for the same here.

Demo

Supported Banks List

  • Credit Card: Paytm supports a majority of issuing Credit Card banks. Please get in touch with us to enable Credit card EMI as a payment source.
  • Debit Card: For checking the eligibility of DC emi, please integrate the API checkEMIEligibility by passing the mobile number linked with DebitCard/Bank account of user. Also pass on the eligible mobile number in field mobileNumber of Process Transaction API. Currently, the following two banks are supported for providing Debit Card EMI as a payment option:
    • HDFC bank
    • ICICI bank
    • Kotak bank (coming soon)

Integration Steps

This section explains the integration steps to process payment through EMI using the Credit/Debit Card with the user's Paytm account. Make sure you have followed the Pre-requisites and Integration Steps mentioned on the Paytm Custom Checkout page.
 

  1. Your backend server calls the Fetch Payment Options API using the transaction token received in response to the Initiate Transaction API request. As part of the API response, you receive the list of banks providing EMIs for your MID.

     Note: In case you have already called this API as part of any other payment mode, then refer to the response from the same.

  2. User selects a bank providing EMI options from the list, say “HDFC Credit Card”, then you call the Offer Discovery API with the ChannelCode of the bank to get the EMI plans offered by the bank.
  3. Paytm returns all the EMI plans details such as tenure, interest rates, min and max amount for the requested channel configured for given MID. The response includes the plan Id of each EMI plan offered by the bank. This also returns any bank offers, if applicable.
  4. You display the plans received by the user.
  5. User selects an EMI plan and then you call the Process Transaction API after the user clicks the Pay button.

    Note: You can hit the Process Transaction API either through Form post or JSON based. Using JSON based integration, you can also collect OTP for 2FA on your page for major banks.

Postman Collection - Payment processing through EMI

This postman collection lets you quickly understand the flow integration for payment processing through EMI. This will help you to understand and test the APIs with sample request/response on integration environment for EMI integration.
 

Run in Postman


To set up the environment for using the Postman Collection, click  here.

  1. You hit the Process Transaction API as an HTML form post through the client. Paytm processes the transaction and redirects the user to the bank page to complete payment by entering the OTP. Please refer to the sample request/response below:
    <form method="post" type="redirect" action="https://securegw-stage.paytm.in/theia/api/v1/processTransaction?mid=INTEGR7769XXXXXX9383&orderId=ORDERID_98765">
            <input type="text" name="mid" value="INTEGR7769XXXXXX9383" />
            <input type="text" name="orderId" value="ORDERID_98765" />
            <input type="text" name="txnToken" value="f0bed899539742309eebd8XXXX7edcf61588842333227" />
            <input type="text" name="paymentMode" value="EMI" />
            <input type="text" name="cardInfo" value="|4375515173401577|942|022022" />
            <input type="text" name="AUTH_MODE" value="otp" />
            <input type="text" name="planId" value="ICICI|3" />
            <input type="submit" />
    </form>
  2. After the user completes the transaction on the bank page, bank redirects the user back to Paytm which in turn redirects the user back on your payment confirmation page.
  3. You receive the transaction status on the Callback URL. Please refer to the sample response here.
  4. Prior to verifying the payment, you must validate the checksumhash received in response to the Process Transaction API. To verify it, use the Paytm library with all the parameters in key-value pairs on the merchant server.
  5. Validate the transaction response via server-side request using the Transaction Status API. You must verify the order Id and amount with your DB entries and consider the status as the final status of the transaction in all cases.
  6. After the transaction status verification, you show the final payment status to the user.
  1. You hit the Process Transaction API as a JSON request (S2S) from the client or backend server. Paytm processes the request and passes the Direct Bank Form and Redirect Bank Form flow in response to your request. Please refer to the sample request/response below:

    Request

    curl -X POST 'https://securegw-stage.paytm.in/theia/api/v1/processTransaction?mid=INTEGR7769XXXXXX9383&orderId=ORDERID_98765' \
    --header 'Content-Type: application/json' \
    --data '{"head":{"txnToken":"f0bed899539742309eebd8XXXX7edcf61588842333227"},"body":{"requestType":"NATIVE","mid":"INTEGR7769XXXXXX9383","orderId":"ORDERID_98765","paymentMode":"EMI","authMode":"otp","cardInfo":"|4375515173401577|942|022022","planId":"ICICI|3"}}'

    Response

    {
        "head": {
            "responseTimestamp": "1595854686242",
            "version": "v1"
        },
        "body": {
            "resultInfo": {
                "resultStatus": "S",
                "resultCode": "0000",
                "resultMsg": "Success"
            },
            "bankForm": {
                "pageType": "redirect",
                "isForceResendOtp": false,
                "redirectForm": {
                    "actionUrl": "https://securegw-stage.paytm.in/mockbank/MockJSP/PAReqEntry.jsp?TrackID=90200727000284730306&amt=2000&cardnum=NDM3NTUxOTQ3OTY3NTAwOQ==",
                    "method": "post",
                    "type": "redirect",
                    "headers": {
                        "Content-Type": "application/x-www-form-urlencoded"
                    },
                    "content": {
                        "MD": "1400450064",
                        "PaReq": "eJxVUsFy4jAM/ZVMzrvYSgokjOIOhdJmZklYCoc9ehy3pEMcapsCf792IO3uTU9PfpKejPfnZh98Sm3qVmUhDGgYSCXaqlZvWbjdLH4m4T3DzU5LOX+R4qglw6U0hr/JoK6ycFEJoeBpltdrU552kP5WpiCvCchlFjJcTdfyg+GtAXP6gwhJD52SFjuuLEMuPh7ygg2HNB67ihvERup8ziACGtEYyRWi4o1kZfGYjoNZuVxui3w23eRl8RL82syRdDSK9qisvrB4OELSAzzqPdtZezATQg78YpuBaJtrdOL7vbRIfAmS79FWRx8ZJ3muKzZ9f10YSEq9PenRiBf6j1XwubqodZsh8RVYcStZRGFMU4gCChNIJtEdki6PvPGzsLWBH5CmA0rdttcUHnyn6RWAIz33bw6d/9qdp1+qRyjPh1ZJV+Gs+4qRfE8+e/YWC+vcG8UJ9MNBDOO7zu6O8jq1cymKadoJeYDEPya3S5Lb8V3036f4C56Zvls=",
                        "TermUrl": "https://securegw-stage.paytm.in/instaproxy/bankresponse/HDFC/CC/90200727000284730306"
                    }
                }
            }
        }
    }

    You select any one of the following flows supported by Paytm to complete the transaction:
    1. Direct Bank Form- You can collect and verify the bank OTP on your page on the web or app. Currently, it is supported for ICICI, HDFC, Citibank, Axis, and SBI only. Paytm calls the bank to send OTP to the user. Bank returns OTP to the user and confirmation to Paytm. Paytm returns a set of supported functions for validating bank OTP. You call the Direct Bank Request API to validate the bank OTP in your app or website.
    2. Redirect Bank Form- It redirects the user to the bank page to complete the payment where you collect and verify the OTP. User completes the transaction on the bank page. Bank redirects the user back to Paytm which in turn redirects the user back on your payment confirmation page.
  2. You receive the transaction status on the Callback URL. Please refer to the sample response here.
  3. Prior to verifying the payment, you must validate the checksumhash received in response to Process Transaction API. To verify it, use the Paytm library with all the parameters in key-value pairs on the merchant server.
  4. Validate the transaction response via server-side request using the Transaction Status API. You must verify the order Id and amount with your DB entries and consider the status as the final status of the transaction in all cases.
  5. After the transaction status verification, you show the final payment status to the user.

Post integration steps

Post completion of integration in your staging environment, it is mandatory to test the Paytm payment sources integration on your website/app before moving into the live environment with production account details (received from Paytm team)

  1. You can view the staging transaction details in the “Test Data” mode on your dashboard.
  2. You must ensure to re-verify the transaction response with the Transaction Status API via server to server call for payment flow and not as a one-time activity.

Post successful testing in your staging environment, move your code to the live environment with production account details. These credentials will be available after you activate your business account with Paytm on the Merchant Dashboard.

Paytm recommends you to read about Managing Refunds and late payment notifications for a better understanding of the integration.

For any issues with the integration, refer to Get in touch.