This project demonstrates how to integrate Paytm payment gateway in a Node.js application. You can use this project to learn how to process online transactions using Paytm APIs.
- Simple and user-friendly interface
- Test and production modes
- Secure and reliable payment processing
- Node.js installed on your system
- A Paytm account with API credentials
- Clone or download this repository
- Navigate to the root folder of the project
- Open a terminal and run
npm i
to install the dependencies - Run
node index.js
to start the server - Open your browser and visit http://localhost:3000/
- Fill the form and click on Pay Now
- If you are using test mode, you will be redirected to a demo Paytm page to confirm the payment
- If you are using production mode, you will be redirected to the actual Paytm page to complete the payment
- Visit https://dashboard.paytm.com/next/apikeys and get your test or production API credentials. You will need your
merchant ID
,merchant key
, andwebsite
name. - Open the paytm folder in the project
- Go to config.js and replace the values with your own credentials
var PaytmConfig = {
mid: "YOUR_MERCHANT_ID",
key: "YOUR_MERCHANT_KEY",
website: "YOUR_WEBSITE_NAME",
};
module.exports.PaytmConfig = PaytmConfig;
- For more information about Paytm integration, you can check their documentation guide: https://developer.paytm.com/docs/
- For testing purposes, you can use their test API key, test wallet details, and deprecated flow integration: