A PayTM checksum api in nodejs to provide backend for Mobile/Web apps
appConfig.js
with your merchant-id/key and hosturlnpm install
npm run start
V1 Base url pattern: http://<host>:<port>/api/v1/paytm/<endpoint>
http://localhost:3000/api/v1/paytm/healthcheck - To verify if API is running correctly
http://localhost:3000/api/v1/paytm/initiatePayment?order_id=123&customer_id=123&amount=10&email=abc@gmail.com - Will redirect to PayTM gateway for payments
http://localhost:3000/api/v1/paytm/callback - This endpoint is called from PayTM with payload about operation
npm install -g firebase-tools
firebase login
firebase init
server
folder from this repository to Functions
folderFunctions/index.js
file
const app = require('./server/app');
exports.api = functions.https.onRequest(app);
firebase deploy
https://<PROJECT_LOCATION>-<PROJECT_NAME>.cloudfunctions.net/api/api/v1/paytm/healthcheck
working
You can also refer to firebase-functions-example
.