FamGateway is a Paymenter payment gateway extension that plugs your billing panel directly into FamGateway — a zero-fee, peer-to-peer UPI payment gateway. Customers get redirected to a hosted checkout (or scan a UPI QR code as a fallback), and invoices are automatically marked as paid the moment FamGateway confirms the transaction.
Built for hosting panels, digital storefronts, and any Paymenter-powered billing system that needs frictionless, fee-free UPI payments.
| Feature | Description |
|---|---|
| Hosted Checkout | Redirects customers to FamGateway's hosted checkout_url for a seamless payment flow |
| UPI QR Fallback | Displays a qr_url UPI QR code if the customer prefers to scan-and-pay |
| Signed Webhooks | Verifies every webhook via X-FamGateway-Signature using timing-safe HMAC-SHA256 |
| Zero-Fee UPI | Leverages FamGateway's zero-fee P2P UPI rails — no card processing overhead |
| INR Native | Purpose-built for INR invoices; gracefully blocks unsupported currencies |
| Drop-in Extension | Standard Paymenter Gateway extension — install, configure, done |
FamGateway-Paymenter/
├── FamGateway.php # Paymenter Gateway extension class (config, pay, webhook)
├── Includes/
│ └── FamGatewayClient.php # Original SDK logic (renamed to avoid class collision)
├── routes/
│ └── web.php # Webhook + redirect callback routes
├── views/
│ ├── pay.blade.php # Hosted checkout redirect + QR fallback view
│ └── error.blade.php # Unsupported currency error view
└── .github/workflows/ # CI workflows
# 1. Copy the extension into your Paymenter installation
cp -r FamGateway extensions/Gateways/
# 2. Enable it from the Paymenter admin panel
# Admin -> Extensions -> Gateways -> FamGateway -> Enable
# 3. Add your FamGateway API Key
# Format: sk_live_...| Step | Action |
|---|---|
| 1 | Copy the FamGateway folder into extensions/Gateways/ |
| 2 | Enable FamGateway from the Paymenter admin panel |
| 3 | Paste your sk_live_... API key into the gateway settings |
| 4 | Save — you're ready to accept UPI payments |
Customer -> pay() -> FamGateway createOrder API -> checkout_url / qr_url
|
v
views/pay.blade.php (auto-redirect)
|
v
Customer completes payment via UPI
|
v
FamGateway -> webhook (X-FamGateway-Signature) -> webhook()
|
v
HMAC-SHA256 verified -> ExtensionHelper::addPayment()
|
v
Invoice marked as PAID
pay()calls FamGateway'screateOrderAPI to retrieve acheckout_url/qr_url, then rendersviews/pay.blade.php, which auto-redirects the customer to the hosted checkout (showing the UPI QR as a fallback).- The invoice ID is embedded directly in the per-order
redirect_urlandwebhook_url(/extensions/gateways/famgateway/webhook/{invoiceId}), since FamGateway's API has no order-metadata field to round-trip an invoice ID the way Razorpay'snotesdoes. webhook()verifies theX-FamGateway-Signatureheader with HMAC-SHA256 (timing-safehash_equals) using your API key as the secret — exactly as in the official SDK — then marks the invoice paid viaExtensionHelper::addPayment()on apayment.success/successevent.- Only INR invoices are supported (FamGateway is UPI-only) — other currencies show a friendly error view, the same pattern used by the Razorpay extension.
Important: FamGateway's
createOrder/getOrderStatusendpoints currently send the API key as a URL query parameter (inherited as-is from the original SDK). This means the key can end up in web server access logs or any proxy/CDN logs in front offamgateway.in.If you plan to distribute this extension publicly, consider reaching out to FamGateway support to ask whether the API key can be passed via an
Authorizationheader instead.
- A working Paymenter installation
- A FamGateway merchant account with a live API key (
sk_live_...) - PHP 8.1+
- INR-based invoicing enabled on your Paymenter store
Contributions, issues, and feature requests are welcome.
- Fork the repo
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
Owner / Developer: Pawan — github.com/ALLAY-XD-20