paytm-verify
v1.0.1
Published
A simple Paytm merchant payment verification utility using MID and Order ID.
Downloads
17
Maintainers
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-verifieror 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
