This page explains how you can integrate net banking in the custom checkout solution to collect payment from your customer. Users can select netbanking as their payment source on the checkout page to complete the payment.
Net Banking Integration
Demo
Integration steps
This section explains the integration steps to process payment through net banking. Make sure you have followed the Pre-requisites and Integration Steps mentioned on the Paytm Custom checkout page.
- 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 top 5 netbanking banks configured on your MID, having a maximum number of transactions in response.
Note: In case you have already called this API as part of any other payment mode, then please ignore this step.
- In case a user wants to pay through a bank other than the top 5 banks received above, you call the Fetch NB Payment channel API.
- Then, you will receive the list of all banks which are configured on your MID with their success rate and icons.
- Once the user selects a bank and clicks Pay to proceed for checkout, you call the Process Transaction API.
Note: You can hit the Process Transaction API either through Form post or JSON based.
Postman Collection - Payment processing through Netbanking
This postman collection lets you quickly understand the flow integration for payment processing through netbanking. This will help you to understand and test the APIs with sample request/response on integration environment for net banking integration.
To set up the environment for using the Postman Collection, click here.
- Paytm processes the request and returns the redirection URL to you using which you redirect the user to the bank page. It displays a bank form to the user where they enter their netbanking credentials to complete the payment. Please refer to the sample Process Transaction 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="NET_BANKING" /> <input type="text" name="channelCode" value="SBI" /> <input type="text" name="AUTH_MODE" value="otp" /> <input type="submit" /> </form>
- Once the user completes the payment on the bank page, they are redirected back to your payment confirmation page by Paytm after validating the transaction.
- You receive the transaction status on the Callback URL. Please refer to the response here.
- 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.
- 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.
- 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)
- You can view the staging transaction details in “Test Data” mode on your dashboard.
- You must ensure to re-verify the transaction response with 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.
<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="NET_BANKING" />
<input type="text" name="channelCode" value="SBI" />
<input type="text" name="AUTH_MODE" value="otp" />
<input type="submit" />
</form>
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":"NET_BANKING","authMode":"otp","channelCode":"SBI"}}'
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"
}
}
}
}
}