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.

Generate API key β†’

Need a Gmail App Password?

The /check endpoint requires a 16-char Gmail App Password (not your normal password).

Get the guide β†’

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

ParameterTypeDescription
keyRequiredYour API key from /keys
upiRequiredYour UPI ID (e.g. yourname@fam)
amountRequiredFixed amount in INR (user can't edit it)
nameRequiredMerchant / 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

ParameterTypeDescription
keyRequiredYour API key from /keys
mailRequiredYour Gmail address (with or without @gmail.com)
apppassRequiredGmail App Password (16 chars, not your normal password)
amountRequiredExpected amount in INR for validation
utrConditional12-digit UTR (for non-FamPay payments)
txnidConditionalFamPay 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

CodeStatusDescription
400Bad RequestMissing or invalid parameters
401UnauthorizedInvalid Gmail app password or authentication failed
403ForbiddenIMAP access disabled or account restricted
404Not FoundPayment not found in email inbox
409ConflictAmount mismatch or duplicate transaction
500Server ErrorMailbox scan failed; try again