How to Get Free FamPay API Key and Start Accepting Automated UPI Payments (2026 Developer Guide)
If you are building an e-commerce website, Telegram bot, Discord marketplace, SaaS platform, or freelancing portal in India, you need an automated way to collect UPI payments. However, corporate aggregators like Razorpay, Cashfree, and PayU require mandatory GST certificates and weeks of manual paperwork. In this developer guide, we show you step-by-step how to get a free FamPay API key using FamGateway and start accepting automated UPI payments in under 5 minutes with 0% commission and zero GST.
Why Developers Choose FamGateway FamPay API
Traditional payment gateways create massive friction for independent programmers. FamGateway eliminates these bottlenecks completely:
- Zero GST / Zero KYC: Start collecting live payments immediately without corporate registration. Learn more in our guide on accepting payments without GST or business KYC.
- 0% Transaction Commission: Keep 100% of your revenue. No 2% cut, no gateway maintenance fees.
- 3–5 Second Automated Verification: Real-time IMAP engine automatically matches the 12-digit FamPay UTR number and dispatches instant webhooks.
- 100% Non-Custodial: Funds land directly in your personal FamApp / UPI account with zero escrow holds.
Step 1: Create Your Free Merchant Account
Getting your credentials takes less than 60 seconds:
- Navigate to the official FamGateway Registration Page.
- Sign up with your Name, Email, and Password.
- Access your personal merchant dashboard immediately—no approval waiting period.
Step 2: Connect Your UPI & Gmail IMAP App Password
FamGateway verifies incoming payments by inspecting official bank confirmation receipts via secure IMAP sockets:
- Go to Settings / Profile in your dashboard.
- Enter your UPI ID (e.g.,
yourname@fam,yourname@okhdfcbank, oryourname@paytm). - Generate a 16-character Gmail App Password and paste it into your dashboard. This ensures stateless, read-only receipt verification without exposing your main Google password.
Step 3: Generate Your FamPay API Key & Secret
Now, generate your developer credentials:
- Click on the API Keys tab from the sidebar menu.
- Click the Generate New API Key button.
- You will receive two credentials:
API Key(e.g.,fg_live_9a8b7c6d5e4f3a2b) — Used in request headers to authenticate your application.Secret Key(e.g.,fg_sec_1092837465abcedf) — Used to verify HMAC-SHA256 signatures on incoming webhooks.
.env).
Step 4: Create Dynamic UPI Payment Sessions via API
To initiate a checkout session, send an HTTP POST request to the FamGateway order endpoint:
Endpoint: POST https://famgateway.in/api/create-order.php
cURL Request Example:
curl -X POST https://famgateway.in/api/create-order.php \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"order_id": "ORD_10029",
"amount": 199.00,
"customer_name": "Rohan Sharma",
"customer_email": "[email protected]",
"redirect_url": "https://yourwebsite.com/success.php"
}'
API Response Example:
{
"status": "success",
"order_id": "ORD_10029",
"amount": "199.00",
"payment_url": "https://famgateway.in/pay.php?session=ses_8f9a2b1c4e",
"qr_data": "upi://pay?pa=merchant@fam&pn=Store&am=199.00&tr=ORD_10029",
"expires_in": 300
}
You can either redirect your customer to the hosted payment_url or render the dynamic QR code directly on your site.
Step 5: Code Integration Examples
1. Python Integration (Telegram Bots & FastAPI / Flask):
import requests
API_KEY = "YOUR_API_KEY"
URL = "https://famgateway.in/api/create-order.php"
payload = {
"order_id": "BOT_ORDER_5541",
"amount": 99.00,
"customer_name": "TelegramUser",
"redirect_url": "https://t.me/YourBot"
}
headers = {
"Content-Type": "application/json",
"x-api-key": API_KEY
}
response = requests.post(URL, json=payload, headers=headers)
data = response.json()
if data.get("status") == "success":
print("Payment Link:", data["payment_url"])
print("UPI Intent Data:", data["qr_data"])
2. PHP Integration:
You can use standard cURL or our official SDK (check our PHP integration tutorial):
$apiKey = "YOUR_API_KEY";
$data = [
"order_id" => "WEB_ORD_" . time(),
"amount" => 299.00,
"customer_name" => "Aman Verma",
"redirect_url" => "https://mystore.com/order-complete"
];
$ch = curl_init("https://famgateway.in/api/create-order.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"x-api-key: " . $apiKey
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
if ($result['status'] === 'success') {
header("Location: " . $result['payment_url']);
exit;
}
Step 6: Handling Instant Webhooks (3–5s Delivery)
When the customer scans and pays, FamGateway verifies the transaction in 3 to 5 seconds and dispatches a signed webhook. Read our in-depth Webhook Architecture & Security Guide to implement signature verification:
// webhook.php (Listener)
$secretKey = "YOUR_SECRET_KEY";
$payload = file_get_contents("php://input");
$data = json_decode($payload, true);
$computedSignature = hash_hmac("sha256", $data['order_id'] . "|" . $data['amount'] . "|" . $data['utr'], $secretKey);
if (hash_equals($computedSignature, $data['signature'])) {
// Payment is 100% verified! Activate customer order or send digital product
http_response_code(200);
echo json_encode(["status" => "acknowledged"]);
} else {
http_response_code(400);
echo "Invalid Signature";
}
Frequently Asked Questions (FAQ)
How do I get a free FamPay API key for my website or bot?
You can generate a free FamPay API key in under 60 seconds by signing up on FamGateway, heading to the 'API Keys' section in your merchant dashboard, and clicking 'Generate New Key'. No GST or business documents are required.
Is there any setup fee or transaction fee for using FamPay API keys?
No. FamGateway provides 100% free access to FamPay API keys with 0% transaction commission. Funds are transferred peer-to-peer directly into your personal UPI ID.
What programming languages are supported by the FamPay API?
FamGateway offers standard RESTful JSON endpoints compatible with any language, including PHP, Python, Node.js (JavaScript/TypeScript), Go, Java, and C#.
How fast are webhook payment notifications dispatched?
Webhooks are dispatched in 3 to 5 seconds as soon as the customer's UPI payment is confirmed by your banking switch via real-time stateless IMAP parsing.
How do I secure my FamPay webhook callbacks?
Every webhook payload includes a cryptographic HMAC-SHA256 signature generated using your API Secret Key, allowing your backend to verify payload integrity and reject spoofed requests.
Conclusion
Stop letting GST and complex corporate onboarding stop you from launching software and collecting payments in India. With FamGateway, you get instant developer API keys, 0% commission, and automated 3–5 second webhook verification.
For complete API reference and SDK downloads, visit our interactive FamGateway API Documentation or connect with 3,000+ engineers on the FamGateway Developer Telegram Desk.
Get Your Free FamPay API Key Now →
Related Developer Guides & Resources
FamGateway Security & Policy Truth: Gmail App Passwords, Account Safety & Universal Bank UPI Support (2026)
Detailed security analysis of FamGateway. Learn why Gmail App Passwords comply with Google policies, how un...
Is FamGateway Legal in India? Comprehensive Analysis Under RBI, IT Act & GST Laws (2026)
Definitive legal and regulatory analysis of FamGateway in India. Discover why non-custodial UPI automation ...
FamPay & FamGateway Competitors (2026): Complete Market & Architecture Analysis
Comprehensive 2026 market guide analyzing FamPay and FamGateway competitors across payment gateways (Cashfr...