FamPay Gateway v1.0.0

Paymenter v2 extension

UPI payments for Paymenter, confirmed from Gmail

FamPay Gateway adds FamPay UPI checkout to Paymenter v2 and marks the invoice paid when the FamPay email reaches Gmail. No OAuth, no payment API, no manual matching.

PHP 8.1+ with the IMAP extension

Invoice 48219

FamPay Gateway

paraexe@fam

Amount

₹1,499.00

Starter plan, annual

Reference FAM-48219
Status Awaiting email

Checking Gmail every 10 seconds

The invoice confirms itself

FamPay Gateway reads the notification email FamPay already sends, matches it against the open invoice and marks it paid. Nobody watches the inbox.

Workflow

From QR to marked paid

  1. 01

    Checkout

    A dynamic UPI QR with the amount and reference already filled in.

  2. 02

    Payment

    The customer pays from GPay, PhonePe, Paytm or any UPI app.

  3. 03

    Inbox

    Gmail is read over IMAP and the FamPay email is parsed.

  4. 04

    Confirmation

    The invoice is marked paid and Discord is notified.

Invoice 48219

₹1,499.00

paraexe@fam

  1. QR generated, amount and reference prefilled
  2. UPI transfer received, ₹1,499.00
  3. FamPay email parsed, remark FAM-48219
  4. Invoice marked paid, Discord notified

Why it works this way

Verification without a payment API

Most UPI gateways ask for a merchant account, an API key and a webhook you have to keep alive. FamPay Gateway reads the email that is already arriving.

  • No manual verificationThe invoice confirms itself once the payment email arrives
  • No Google Cloud projectA Gmail App Password is the only credential, no OAuth flow
  • No second APINothing to integrate beyond Paymenter and the inbox
  • Configured in the admin panelUPI, Gmail, timers and Discord live in the gateway settings
  • Readable in DiscordEvery payment event posts to the channel you choose
  • Built for concurrent paymentsAmbiguous matches are held instead of guessed

Features

What the extension does

Everything below ships in version 1.0.0

Payment experience

06
Dynamic QR codes
Generated per invoice with the amount and reference already filled in.
UPI deep linking
Opens the payment in a UPI app directly from a phone.
Any UPI app
GPay, PhonePe, Paytm and the rest of the UPI network.
Payment countdown
A visible expiry timer on the checkout page.
Live payment status
Status is checked at the interval you configure.
Responsive checkout
Reads cleanly on a phone, where most UPI payments start.

Verification

07
Gmail IMAP
Reads FamPay notifications straight from the inbox.
Automatic detection
No one has to tick a box in the admin panel.
Smart matching
Remark and amount are compared against open invoices.
Reference matching
Numeric invoice references are matched inside the UPI remark.
Deduplication
Processed transaction IDs are cached and never claimed twice.
Ambiguity protection
Several candidate invoices means the payment is left alone.
Flexible parsing
Email formats are read through configurable patterns.

Discord

07
Gateway triggered
The customer reached the FamPay checkout.
Checking for payments
An inbox poll started or finished.
Payment email found
A FamPay notification matched the filter.
Payment confirmed
The invoice is paid, with amount, UTR and sender.
Payment expired
The countdown ran out before the email arrived.
Verification error
Authentication or parsing failed, with the reason.
Connection test
The result of a webhook test from the admin panel.

Administration

08
Connection testing
A visual page for every integration.
IMAP diagnostics
Authentication and mailbox access, checked.
UPI validation
The configured UPI ID format is verified.
Webhook testing
Discord connectivity, without a real payment.
Latest email preview
The last detected notification and what was extracted.
Troubleshooting hints
Diagnostic messages suggest the next step.
Debug logging
Optional Laravel logging when something is unclear.
Admin configuration
No files to edit after installation.

Webhook

One message per payment

The confirmation carries what you need to reconcile the invoice later, and nothing else. Webhook URLs are treated as credentials and stay in the gateway settings.

FamPay Gateway #payments

Payment confirmed

Invoice
48219
Amount
₹1,499.00
UTR
431928455120
Sender
fam@okhdfc

1 candidate, reference match

Matching

Reference first, amount only as a fallback

Pass one reads the UPI remark. Pass two can fall back to the amount, and only with a single eligible invoice

  • Unique referencesNumeric invoice references identify the payment
  • Exact note matchThe UPI remark is matched before anything else
  • Amount fallbackUsed only with a single eligible candidate
  • Duplicate preventionProcessed transaction IDs are cached
  • Ambiguity protectionMultiple candidates block automatic matching
  • Time windowOnly relevant payment times are considered

Customers should use the reference shown on the payment page as their UPI remark. Amount matching is a fallback, not a replacement.

Match log invoice 48219
remark FAM-48219    invoice FAM-48219    matched
remark —            amount  ₹1,499.00    single candidate
remark —            invoices 3 at ₹1,499  held

Installation

Four steps to a live gateway

Assumes a Paymenter v2 install at /var/www/paymenter

01

Install the PHP IMAP extension

Email verification needs php-imap. After installing, restart PHP-FPM and confirm the module is loaded.

bash
sudo apt update
sudo apt install php-imap
sudo systemctl restart php8.2-fpm
php -m | grep -i imap

Replace 8.2 with the PHP version you run. The last command should print imap.

02

Upload the extension

Place the FampayGateway directory in the Paymenter gateway folder and check that every file arrived.

path
git clone https://github.com/ItzMePara9/Fampay-Gateway-Paymenter /var/www/paymenter/extensions/Gateways/Fampay-Gateway-Paymenter
03

Refresh the Composer autoloader

Paymenter will not see the gateway until the autoloader is rebuilt.

bash
cd /var/www/paymenter
composer dump-autoload
04

Enable the gateway

In the administration panel, open Admin → Gateways, create a gateway and choose FamPay Gateway. Fill in the UPI, Gmail and Discord settings, save, then run the diagnostic page once.

  1. Create gateway
  2. Choose FamPay Gateway
  3. Set UPI and Gmail details
  4. Save configuration
  5. Run the connection test

Gmail App Password

The only credential you need

No Google Cloud project, no OAuth application. A Gmail account with two-step verification and an app password is enough.

  1. 01

    Turn on two-step verification

    Enable it on the Gmail account that receives FamPay notifications.

    Google Account Security
  2. 02

    Generate an app password

    Create a password named after this gateway, then copy the 16 characters Google gives you.

    Google App Passwords
  3. 03

    Enter it in Paymenter

    Gmail app password
    16 characters
    FamPay sender
    sender used for filtering

Treat the app password like any other production secret. Keep it out of Git, use a dedicated mailbox where possible, and restrict who can open the gateway settings.

Configuration

Gateway settings

Recommended

10minutesPayment timeout
10secondsPoll interval
SettingWhat it doesRequired
UPI IDYour FamPay UPI ID, used in the QR and the deep linkYes
Payee nameThe name shown inside the customer's UPI appYes
Gmail emailThe mailbox receiving FamPay notificationsYes
Gmail app passwordIMAP authentication for that mailboxYes
Payment timeoutHow long the QR stays payable, in minutesYes
Poll intervalHow often the inbox is checked, in secondsYes
FamPay senderSender address used to filter notificationsYes
Debug modeWrites verification detail to the Laravel logNo
Discord webhookChannel that receives payment eventsNo
Test connectionOpens the diagnostic pageNo

Tune the timeout and poll interval to your server resources and payment volume.

Diagnostics

One page that says what is broken

The built-in test page checks every integration in order and shows the extracted data, so a failing IMAP login is not confused with a missing email.

url
https://yourdomain.com/extensions/gateways/FampayGateway/test
  • PHP IMAPThe extension is installed and loaded
  • UPI validationThe configured UPI ID is well formed
  • Gmail configurationEmail and app password are present
  • Gmail IMAP connectionLogin and mailbox access succeed
  • Email searchFamPay notifications from the last seven days
  • Email parsingFields extracted from the latest message
  • Discord webhookA test message reaches the channel

Troubleshooting

When a payment does not confirm

Start with the diagnostic page, then the Laravel log

SymptomFix
IMAP connection failedCheck the Gmail address and the app password, not the account password
IMAP extension missingInstall php-imap, then restart PHP-FPM
Payments not detectedConfirm FamPay notifications reach the inbox at all
Wrong invoice matchedMake the customer copy the reference into the UPI remark
QR code not loadingCheck outbound access to the QR generation provider
Discord silentRetest the webhook and check channel permissions
Timer ends earlyVerify the extension version and the payment session settings
Gateway not listedRun composer dump-autoload and read the log
bash
tail -f /var/www/paymenter/storage/logs/laravel.log

Changelog

Version 1.0.0, initial release

2026

Payment features

  • UPI QR code generation
  • Mobile UPI deep linking
  • Configurable expiry
  • Live status polling
  • Responsive checkout

Verification

  • Gmail IMAP integration
  • App password authentication
  • FamPay notification detection
  • Two-pass matching
  • Concurrent payment protection
  • Transaction deduplication

Discord

  • Real-time payment events
  • Seven event types
  • Transaction detail in messages
  • Webhook connectivity testing

Administration

  • Visual diagnostic interface
  • Gmail connection testing
  • Latest email preview
  • Configurable debug mode
  • Admin-side configuration