Generate FamPay UPI QR codes and verify payments in real-time with simple direct URL endpoints. No complex headers needed.
Simple 4-step flow to integrate payment verification
Create a Master API Key from admin panel or via create-key endpoint.
Login with Gmail + App Password to get a Gmail Key for email verification.
Create a UPI QR code with FamPay UPI ID and amount. Get Order ID.
Check payment status by Order ID. Auto-scans Gmail for confirmation.
All endpoints accept both GET (URL parameters) and POST (JSON body) requests
Creates a new Master API Key. Requires admin password. This key is needed for all other API calls.
| Parameter | Type | Required | Description |
|---|---|---|---|
| admin_password | string | Required | Admin password |
| key_name | string | Required | Name for the API key |
{
"success": true,
"message": "Master API Key created",
"data": {
"api_key": "Ab3xKm",
"key_name": "MyApp",
"status": "active"
}
}Generates a FamPay UPI payment QR code with specified UPI ID and amount. QR expires in 15 minutes.
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Required | Master API Key |
| upi | string | Required | FamPay UPI ID (e.g. kankan1@fam) |
| amount | number | Required | Amount in INR (1 to 100000) |
{
"success": true,
"data": {
"order_id": "FAM20250105ABCD1234",
"upi_id": "kankan1@fam",
"amount": 100,
"status": "pending",
"qr_code": {
"image_url": "https://api.qrserver.com/...",
"base64": "data:image/png;base64,...",
"upi_deeplink": "upi://pay?pa=kankan1@fam..."
},
"expires_in_minutes": 15,
"expires_at": "2025-01-05 12:15:00",
"verify_url": "https://kankan-in.myvipsite.fun/verify.php?order_id=FAM...&api_key=Ab3xKm&gmail_key=YOUR_KEY"
}
}Login with Gmail and Google App Password via IMAP. Returns a Gmail Key needed for payment verification.
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Required | Master API Key |
| gmail | string | Required | Gmail address |
| app_password | string | Required | Google App Password (16 chars) |
{
"success": true,
"message": "Gmail login successful",
"data": {
"gmail_key": "Xt7pQw",
"gmail": "your@gmail.com",
"status": "active"
}
}Check if a UPI payment has been received. Scans Gmail for FamPay payment notification emails. Returns payment details including UTR, payer info, and amount.
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Required | Master API Key |
| gmail_key | string | Required | Gmail Key from login |
| order_id | string | Required | Order ID from QR generation |
{
"success": true,
"message": "Payment verified successfully!",
"data": {
"order_id": "FAM20250105ABCD1234",
"status": "SUCCESS",
"payment_found": true,
"amount": 100.00,
"payment_details": {
"utr": "ABC123456789",
"payer_name": "John Doe",
"payer_upi": "john@ybl",
"payment_date": "2025-01-05 12:05:00",
"verified_at": "2025-01-05 12:06:30"
}
}
}{
"success": true,
"data": {
"order_id": "FAM20250105ABCD1234",
"status": "PENDING",
"payment_found": false,
"time_remaining": "12:30",
"time_remaining_seconds": 750,
"retry_after_seconds": 30
}
}{
"success": true,
"data": {
"order_id": "FAM20250105ABCD1234",
"status": "EXPIRED",
"payment_found": false,
"expired_at": "2025-01-05 12:15:00"
}
}| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | Missing or invalid parameters |
| 401 | Unauthorized | Invalid or inactive API key |
| 403 | Forbidden | Wrong admin password |
| 404 | Not Found | Order ID not found |
| 500 | Server Error | Internal server error |
| 503 | Unavailable | Gmail IMAP connection failed |
15 Min Expiry: QR codes expire after 15 minutes. Generate a new one if expired.
Retry Logic: Payment emails take 1-3 minutes. Retry verification every 30 seconds.
App Password: Use Google App Password (16 chars), not your regular Gmail password.
IMAP Access: Enable IMAP in Gmail Settings > Forwarding and POP/IMAP.
Notifications: FamPay payment alerts must arrive on the connected Gmail.
Simple URLs: All endpoints work with GET parameters. No headers required.