npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

paytm-verify

v1.0.1

Published

A simple Paytm merchant payment verification utility using MID and Order ID.

Downloads

17

Readme

💳 Paytm Merchant Payment Verifier

Easily verify your Paytm merchant transactions using just your MID and Order ID.
Built with ❤️ by @UdayScripts.


🧩 Overview

This package provides a simple interface to verify any Paytm merchant payment status.
You can instantly check whether a payment is successful, failed, or invalid, and get all transaction details in one function call.


🚀 Installation

Install via npm:

npm install paytm-verifier

or via yarn:

yarn add paytm-verifier

⚙️ Usage Example

✅ Basic Example

const verifyPaytm = require("paytm-verifier");

(async () => {
  const result = await verifyPaytm("MID", "ORDER_ID");
  console.log(result);
})();

Output (Example)

{
  "success": false,
  "orderId": "2025063018480459595",
  "status": "TXN_FAILURE",
  "amount": null,
  "message": "Invalid Order Id.",
  "date": null,
  "paymentMode": null,
  "bankTxnId": null,
  "missingFields": [
    "TXNID",
    "BANKTXNID",
    "TXNAMOUNT",
    "TXNTYPE",
    "GATEWAYNAME",
    "BANKNAME",
    "PAYMENTMODE",
    "REFUNDAMT",
    "TXNDATE"
  ],
  "readable": "❌ Payment Failed\nOrder ID: 2025063018480459595\nReason: Invalid Order Id."
}

🧠 Parameters

| Parameter | Type | Required | Description | |------------|--------|-----------|-------------| | mid | string | ✅ Yes | Your Paytm Merchant ID | | orderId | string | ✅ Yes | The Paytm Order ID of the transaction you want to verify |


🧾 Response Object

| Field | Description | |-------|-------------| | success | Boolean value — true if payment was successful | | orderId | Your Paytm Order ID | | status | Transaction status (TXN_SUCCESS, TXN_FAILURE, etc.) | | amount | Transaction amount (if available) | | message | Response message (e.g., “Txn Successful”, “Invalid Order Id.”) | | date | Transaction date (if available) | | paymentMode | Payment method used (UPI, Card, Wallet, etc.) | | bankTxnId | Bank transaction reference number | | missingFields | Any data fields that were empty in the Paytm response | | readable | Human-friendly text summary |


🧪 Example Success Response

{
  "success": true,
  "orderId": "ORDER12345",
  "status": "TXN_SUCCESS",
  "amount": "499.00",
  "message": "Txn Successful.",
  "date": "2025-11-08 14:32:05",
  "paymentMode": "UPI",
  "bankTxnId": "1234567890",
  "readable": "✅ Payment Successful\nOrder ID: ORDER12345\nAmount: ₹499.00\nDate: 2025-11-08 14:32:05\nMode: UPI\nBank Txn ID: 1234567890"
}

🛠️ Error Handling

If any field or parameter is missing, the function will throw an error.

Example:

const verifyPaytm = require("paytm-verifier");

verifyPaytm("", "")
  .catch(err => console.error(err.message));

Output:

Both 'mid' and 'orderId' are required.

🧩 Integrations

You can integrate this with:

  • 💬 Telegram bots (for checking payment status)
  • 🧾 Admin dashboards
  • 🌐 E-commerce / Digital product systems
  • ⚙️ Node.js backends (Express, Fastify, etc.)

👨‍💻 Author & Credits

Developer: @UdayScripts
Channel: Join Updates on Telegram


⚖️ License

This project is licensed under the MIT License.
You’re free to use, modify, and distribute it with proper credit.


Support & Updates
Join my Telegram channel for more APIs, scripts, and open-source projects:
👉 t.me/UdayScripts