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 🙏

© 2026 – Pkg Stats / Ryan Hefner

fampay-verify

v1.0.3

Published

FamPay payment verification utility and QR generator for Node.js

Downloads

570

Readme

fampay-verify

npm version npm downloads

A lightweight, secure, and 100% universal Node.js package to verify FamPay UPI payments automatically by checking Gmail alerts via IMAP.

Compatible with any database (MongoDB, Postgres, MySQL, Supabase, SQLite) and runs in any Node.js environment (Websites, Discord Bots, Telegram Bots, CLI tools).

Features

  • Dynamic Amount Verification (No UTR Required): Matches incoming payments automatically by searching for unique decimal amounts (e.g. ₹25.01).
  • Manual UTR/TxnID Verification: Fallback to let users paste their 12-digit UTR number manually.
  • 15-Minute Expiry Check: Automatically ignores old payment emails to prevent duplicate claims.
  • Optional Supabase Logging: Built-in auto-logging and replay attack protection if you choose to connect Supabase, or use your own custom database (like MongoDB).
  • QR Code Generator: Built-in API to generate UPI payment links and base64 QR code images instantly.

Installation

npm install fampay-verify

Quick Start

1. Generating a Payment QR Code

import { FamPayVerifier } from 'fampay-verify';

const verifier = new FamPayVerifier({
  gmail: '[email protected]',
  gmailAppPassword: 'your_gmail_app_password_without_spaces'
});

// Generate UPI QR Code and Link
const qrResult = await verifier.generateQr({
  upiId: 'yuvraj@fam',
  amount: '25.01',
  name: 'Yuvraj Jaiswal'
});

console.log(qrResult.qr_image);  // Base64 Image string (insert into <img src="..." />)
console.log(qrResult.upi_uri);   // upi://pay?pa=yuvraj@fam&pn=...

2. Verifying a Payment (Database-Free / Custom DB)

// Check for a recent ₹25.01 payment in the inbox
const result = await verifier.verifyPayment({
  amount: '25.01'
});

if (result.verified) {
  console.log(`Success! Received ₹${result.amount} from ${result.sender_name}`);
  console.log(`UTR Number: ${result.utr}`);
  
  // Here, you can save the result.utr to MongoDB/Postgres to prevent reuse
} else {
  console.log(`Failed: ${result.message}`);
}

3. Verifying a Payment (with Supabase Auto-Logging)

If you configure Supabase, the package will automatically check for duplicate UTR usage (replay protection) and write transaction logs to your Supabase tables.

const verifier = new FamPayVerifier({
  supabaseUrl: 'https://your-supabase.supabase.co',
  supabaseServiceRoleKey: 'your-supabase-service-role-key',
  gmail: '[email protected]',
  gmailAppPassword: 'your_gmail_app_password'
});

const result = await verifier.verifyPayment({
  amount: '25.01'
});

How to get Google App Password

For security, Google requires an App Password to log in over IMAP:

  1. Go to your Google Account Settings.
  2. Navigate to Security and turn on 2-Step Verification.
  3. Search for "App passwords" in the top search bar.
  4. Create a new App Password (e.g. name it "FamPay Verifier"), copy the 16-character code, and use it in your code config.

Dev Handle

Created by @iy3k.