REST API Β· JSON responses
API Documentation
Integrate FamPay payment verification into your application in minutes with our simple REST API.
π You need an API key
Every request to /genqr and /check requires ?key=YOUR_API_KEY. Sign up, then generate a key from your dashboard.
Need a Gmail App Password?
The /check endpoint requires a 16-char Gmail App Password (not your normal password).
Live API Playground
Try the API directly from your browser. No signup needed.
/api/public/genqr?key=&upi=yourname%40fam&amount=10&name=My+Store
Response
Response will appear hereβ¦1. Generate UPI QR
Create a dynamic UPI QR code. Requires an API key.
GEThttps://fusioniuapi.mespark.in/api/public/genqr?key=YOUR_API_KEY&upi=YOURUPI@fam&amount=AMOUNT&name=MERCHANTNAME
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| key | Required | Your API key from /keys |
| upi | Required | Your UPI ID (e.g. yourname@fam) |
| amount | Required | Fixed amount in INR (user can't edit it) |
| name | Required | Merchant / payee name shown on the QR |
Response
json
{
"status": "success",
"data": {
"qr_image": "data:image/png;base64,iVBOR...",
"upi_uri": "upi://pay?pa=yourname@fam&pn=My%20Store&am=10&cu=INR",
"upi_id": "yourname@fam",
"amount": "10",
"name": "My Store",
"created_at_ist": "16-05-2026 23:47:00"
},
"dev": "@btwspark"
}2. Verify Payment
Scan your Gmail for FamPay "You received" emails and confirm payment.
For payments from other apps (Paytm / GPay / PhonePe β FamPay) use utr:
GEThttps://fusioniuapi.mespark.in/api/public/check?key=YOUR_API_KEY&mail=YOUREMAIL@gmail.com&apppass=APPPASSWORD&utr=UTRNUMBER&amount=AMOUNT
For FamPay β FamPay transfers use txnid:
GEThttps://fusioniuapi.mespark.in/api/public/check?key=YOUR_API_KEY&mail=YOUREMAIL@gmail.com&apppass=APPPASSWORD&txnid=FMPIBXXXXXXX&amount=AMOUNT
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| key | Required | Your API key from /keys |
| Required | Your Gmail address (with or without @gmail.com) | |
| apppass | Required | Gmail App Password (16 chars, not your normal password) |
| amount | Required | Expected amount in INR for validation |
| utr | Conditional | 12-digit UTR (for non-FamPay payments) |
| txnid | Conditional | FamPay Txn ID like FMPIB... (FamPay β FamPay only) |
Important: Use either
utr OR txnid β not both. We only scan emails starting with "You received" to ensure valid payment confirmations.Success Response
json
{
"status": "success",
"data": {
"transaction_id": "FMPIB5255631361",
"amount": 10,
"utr": "301268197755",
"sender_name": "Anuj Patel",
"payment_time_ist": "16-05-2026 23:50:12",
"verified": true
},
"dev": "@btwspark"
}Error Responses
json
// 401 Missing or invalid key
{ "status": "error", "message": "API key required", "dev": "@btwspark" }
// 403 Blocked / disabled
{ "status": "error", "message": "Account blocked", "dev": "@btwspark" }
// 409 Already verified (each UTR / Txn ID can only be used ONCE)
{ "status": "error", "message": "Transaction already verified",
"details": "This UTR / Txn ID has already been used.", "dev": "@btwspark" }
// 404 Not Found
{ "status": "error", "message": "Transaction not found",
"details": "No matching payment found in email inbox", "dev": "@btwspark" }
// 409 Amount Mismatch
{ "status": "error", "message": "Amount mismatch", "expected": 10, "found": 5, "dev": "@btwspark" }
// 401 Gmail Auth failure
{ "status": "error", "message": "Invalid Gmail app password or authentication failed", "dev": "@btwspark" }Integration Examples
Copy-paste ready snippets in your favorite language.
β Generate QR
curl
curl "https://fusioniuapi.mespark.in/api/public/genqr?upi=yourname@fam&amount=10&name=My%20Store"β Verify Payment
curl
curl "https://fusioniuapi.mespark.in/api/public/check?mail=you@gmail.com&apppass=abcdefghijklmnop&utr=301268197755&amount=10"Error Codes
| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | Missing or invalid parameters |
| 401 | Unauthorized | Invalid Gmail app password or authentication failed |
| 403 | Forbidden | IMAP access disabled or account restricted |
| 404 | Not Found | Payment not found in email inbox |
| 409 | Conflict | Amount mismatch or duplicate transaction |
| 500 | Server Error | Mailbox scan failed; try again |
