Guide #40 Developer & API Guide

How to Get Free FamPay API Key and Start Accepting Automated UPI Payments (2026 Developer Guide)

By Aryan Gupta August 31, 2026 5 min read

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. For an in-depth breakdown of how the integration engine works, read our architectural guide on the unofficial FamPay API for developers.

Developer TL;DR: FamGateway provides free RESTful API keys that allow any developer, student, or solo builder to generate dynamic UPI QR codes, track payments in real-time, and receive signed HMAC-SHA256 webhooks in 3 to 5 seconds directly to personal savings or FamPay accounts.

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:

  1. Navigate to the official FamGateway Registration Page.
  2. Sign up with your Name, Email, and Password.
  3. 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:

  1. Go to Settings / Profile in your dashboard.
  2. Enter your UPI ID (e.g., yourname@fam, yourname@okhdfcbank, or yourname@paytm).
  3. 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:

  1. Click on the API Keys tab from the sidebar menu.
  2. Click the Generate New API Key button.
  3. 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.
Security Warning: Never expose your Secret Key in client-side frontend code (React, Vue, or Android APKs). Keep it securely stored in server-side environment variables (.env).

Step 4: Create Dynamic UPI Payment Sessions via API

To initiate a checkout session, send a standard HTTP POST request with your API key in the request header to the canonical FamGateway endpoint:

Canonical Endpoint: POST https://famgateway.in/api/create-order

cURL Request Example:

curl -X POST "https://famgateway.in/api/create-order" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "amount": 199.00,
    "customer_name": "Rohan Sharma",
    "redirect_url": "https://yourwebsite.com/success.php",
    "webhook_url": "https://yourwebsite.com/webhook.php"
  }'

API Response Example:

{
  "status": "success",
  "data": {
    "order_id": "ORD_A1B2C3D4",
    "amount": "199.00",
    "payable_amount": "199.00",
    "upi_id": "merchant@fam",
    "qr_url": "https://famgateway.in/api/qr-image.php?order_id=ORD_A1B2C3D4",
    "checkout_url": "https://famgateway.in/pay.php?order_id=ORD_A1B2C3D4",
    "upi_intent": "upi://pay?pa=merchant%40fam&pn=FamPay&tr=ORD_A1B2C3D4&tn=ORD_A1B2C3D4&am=199.00&cu=INR",
    "created_at_ist": "08-09-2026 14:30:00",
    "expires_at_ist": "08-09-2026 14:35:00"
  }
}

You can either redirect your customer to data.checkout_url for our hosted payment page with live polling, or embed data.qr_url directly as an image in your custom UI.

Step 5: Code Integration Examples

1. Python Integration (Official PyPI SDK):

Install the official client via pip:

pip install famgateway

Create an order in 3 lines:

from famgateway import FamGateway

# Initialize client with your private API key
fg = FamGateway(api_key="YOUR_API_KEY")

# Create a dynamic payment order
order = fg.create_order(amount=99.00, customer_name="TelegramUser")

print("Hosted Checkout URL:", order.checkout_url)
print("UPI Deep Link Intent:", order.upi_intent)
print("QR Code Image URL:", order.qr_url)

# Poll payment status anytime
status = fg.get_status(order.order_id)
if status.is_paid:
    print("Payment verified! Bank UTR:", status.utr)

2. PHP Integration (Canonical JSON POST):

You can use standard PHP cURL or stream context without external dependencies:

<?php
$apiKey = "YOUR_API_KEY";
$payload = json_encode([
    "amount" => 299.00,
    "customer_name" => "Rohan Sharma",
    "redirect_url" => "https://mystore.com/order-complete",
    "webhook_url" => "https://mystore.com/webhook.php"
]);

$ch = curl_init("https://famgateway.in/api/create-order");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $payload,
    CURLOPT_HTTPHEADER => [
        "Content-Type: application/json",
        "X-Api-Key: $apiKey"
    ]
]);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
if (($result['status'] ?? '') === 'success') {
    // Redirect buyer directly to Hosted Checkout
    header("Location: " . $result['data']['checkout_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)
$apiKey = "YOUR_API_KEY";
$rawPayload = file_get_contents("php://input");
$signature = $_SERVER['HTTP_X_FAMGATEWAY_SIGNATURE'] ?? '';

// Verify HMAC-SHA256 signature
$expectedSignature = hash_hmac("sha256", $rawPayload, $apiKey);

if (!hash_equals($expectedSignature, $signature)) {
    http_response_code(401);
    die("Invalid Signature");
}

$data = json_decode($rawPayload, true);

if (($data['status'] ?? '') === 'success') {
    $orderId = $data['order_id'];
    $utr = $data['utr'];
    $amount = $data['amount'];
    
    // Payment is 100% verified! Activate customer order or send digital product
    http_response_code(200);
    echo json_encode(["status" => "acknowledged"]);
    exit;
}

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 →

Topic Cluster & Series

Related Developer Guides & Resources

View All 70+ Guides →
Developer Guide

How to Integrate FamPay Payment Gateway in PHP

A step-by-step developer guide on using FamGateway's REST API to automate UPI verifications in PHP.

Read Guide →
SMM Panels

How to Integrate FamPay UPI Payment Gateway in SMM Panels (Rental, Perfect Panel & SmartPanel)

Step-by-step developer guide to integrating FamPay UPI payment gateway in SMM panels (Rental, Perfect Panel...

Read Guide →
WooCommerce

How to Accept UPI Payments on WooCommerce Without GST or Current Account (2026 Guide)

Complete tutorial on accepting automated UPI payments on WooCommerce without GST or a commercial current ac...

Read Guide →

Back to Homepage →

About the Platform

FamGateway is an official unit of ARYANISPE, founded by Aryan Gupta (Aryanispe) and officially registered under the Ministry of Micro, Small and Medium Enterprises (MSME), Government of India (Reg: UDYAM-BR-28-0050000).

Legal Disclaimer: FamGateway is an independent developer automation tool operated by ARYANISPE. FamGateway is not affiliated with, authorized, maintained, sponsored, or endorsed by Tri O Tech Solutions Private Limited, FamApp, or FamPay. All brand names, logos, and trademarks belong to their respective owners.

All Systems Operational