API Documentation

Complete payment gateway integration guide for all services

v2.0 BharatPe (Manual) PayTM (Auto) FamApp (Auto)

Authentication (All Services)

All API requests require an API key. Include it in the request headers:

X-API-Key: YOUR_API_KEY_HERE
Content-Type: application/json

Get your API key from Account Settings → API Keys

Keep your API key secure! Never expose it in client-side code.

BharatPe Integration

Manual UTR Verification - Customer needs to enter 12-16 digit UTR number

Manual UTR Entry 30 min expiry
Create BharatPe Payment

POST/api/create_payment.php

Request Body
ParameterTypeRequiredDescription
customer_idstringRequiredUnique customer identifier
customer_namestringOptionalCustomer name
amountfloatRequiredAmount in INR (₹1 - ₹10,000)
product_namestringOptionalProduct name
servicestringOptionalUse "bharatpe"
Example Request
curl -X POST https://storepanel.royalflood.site/api/create_payment.php \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "CUST_001",
    "customer_name": "John Doe",
    "amount": 500,
    "product_name": "Premium Service",
    "service": "bharatpe"
  }'
Example Response
{
  "success": true,
  "service": "bharatpe",
  "order_id": "ORDABC123XYZ",
  "payment_link": "https://storepanel.royalflood.site/payment/pay.php?order=ORDABC123XYZ",
  "qr_url": "https://quickchart.io/qr?text=...",
  "qr_amount": 500.37,
  "upi_id": "merchant@okhdfcbank",
  "expires_at": "25-05-2026 04:00:00 PM",
  "expires_in_minutes": 30
}
Verify BharatPe Payment (Manual UTR)

POST/api/verify_payment.php

Customer needs to enter the 12-16 digit UTR number from their bank statement.

Request Body
ParameterTypeRequiredDescription
order_idstringRequiredOrder ID from create response
utrstringRequired12-16 digit UTR number
Example Request
curl -X POST https://storepanel.royalflood.site/api/verify_payment.php \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "ORDABC123XYZ",
    "utr": "123456789012"
  }'
Success Response
{
  "success": true,
  "message": "✅ Payment verified successfully!",
  "payment_id": "PAY12345678",
  "order_id": "ORDABC123XYZ",
  "amount": 500,
  "utr": "123456789012"
}
Error Responses
{
  "success": false,
  "message": "❌ UTR not found in BharatPe records."
}

{
  "success": false,
  "message": "❌ This UTR has already been used!"
}

{
  "success": false,
  "message": "❌ Amount mismatch! Expected ₹500.37, Found ₹100.00"
}

PayTM Integration

Auto Verification - One click verify, no UTR number needed!

Auto Verify 30 min expiry
Create PayTM Payment

POST/api/create_payment.php

Request Body
ParameterTypeRequiredDescription
customer_idstringRequiredUnique customer identifier
customer_namestringOptionalCustomer name
amountfloatRequiredAmount in INR (₹1 - ₹10,000)
product_namestringOptionalProduct name
servicestringOptionalUse "paytm"
Example Request
curl -X POST https://storepanel.royalflood.site/api/create_payment.php \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "CUST_002",
    "customer_name": "Jane Doe",
    "amount": 1000,
    "product_name": "Subscription",
    "service": "paytm"
  }'
Example Response
{
  "success": true,
  "service": "paytm",
  "order_id": "ORDABC123XYZ",
  "payment_link": "https://storepanel.royalflood.site/payment/paytm_pay.php?order=ORDABC123XYZ",
  "paytm_order_id": "PTM_ABC123XYZ",
  "qr_url": "https://quickchart.io/qr?text=...",
  "qr_amount": 1000.45,
  "upi_id": "merchant@paytm",
  "expires_at": "25-05-2026 04:00:00 PM",
  "expires_in_minutes": 30
}
Note: Response includes paytm_order_id - save this for verification.
Verify PayTM Payment (Auto Verify)

POST/api/verify_paytm.php

No UTR number needed! Just click verify and our system automatically checks PayTM API.

Request Body
ParameterTypeRequiredDescription
order_idstringRequiredOrder ID from create response
paytm_order_idstringRequiredPayTM Order ID from create response
Example Request
curl -X POST https://storepanel.royalflood.site/api/verify_paytm.php \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "ORDABC123XYZ",
    "paytm_order_id": "PTM_ABC123XYZ"
  }'
Success Response
{
  "success": true,
  "message": "✅ Payment verified successfully!",
  "payment_id": "PAY12345678",
  "order_id": "ORDABC123XYZ",
  "amount": 1000,
  "utr": "PAYTM_169884605251"
}
Pending Response
{
  "success": false,
  "message": "⏳ Payment pending. Please complete the payment first."
}

FamApp Integration

Auto Verification - One click verify, 5 minutes expiry only!

Auto Verify 5 min expiry
Important: FamApp payment links expire in 5 minutes only! Make sure your customer pays quickly.
Create FamApp Payment

POST/api/create_payment.php

Request Body
ParameterTypeRequiredDescription
customer_idstringRequiredUnique customer identifier
customer_namestringOptionalCustomer name
amountfloatRequiredAmount in INR (₹1 - ₹10,000)
product_namestringOptionalProduct name
servicestringOptionalUse "famapp"
Example Request
curl -X POST https://storepanel.royalflood.site/api/create_payment.php \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "CUST_003",
    "customer_name": "Mike Smith",
    "amount": 250,
    "product_name": "Digital Product",
    "service": "famapp"
  }'
Example Response
{
  "success": true,
  "service": "famapp",
  "order_id": "ORDABC123XYZ",
  "payment_link": "https://storepanel.royalflood.site/payment/famapp_pay.php?order=ORDABC123XYZ",
  "qr_url": "https://quickchart.io/qr?text=...",
  "qr_amount": 250.78,
  "upi_id": "merchant@fam",
  "merchant_name": "Your Business Name",
  "expires_at": "25-05-2026 03:05:00 PM",
  "expires_in_minutes": 5
}
Verify FamApp Payment (Auto Verify)

POST/api/verify_famapp.php

No UTR number needed! Our system automatically checks FamApp API.

Request Body
ParameterTypeRequiredDescription
order_idstringRequiredOrder ID from create response
Example Request
curl -X POST https://storepanel.royalflood.site/api/verify_famapp.php \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "ORDABC123XYZ"
  }'
Success Response
{
  "success": true,
  "message": "✅ Payment verified successfully!",
  "payment_id": "PAY12345678",
  "order_id": "ORDABC123XYZ",
  "amount": 250,
  "utr": "FAM_169884605251"
}
Amount Mismatch Response
{
  "success": false,
  "message": "⚠️ Payment failed: Order ID matched but amount mismatch."
}

Common Endpoints (All Services)

Check Payment Status

GET/api/check_status.php?order_id={order_id}

curl "https://storepanel.royalflood.site/api/check_status.php?order_id=ORDABC123XYZ" \
  -H "X-API-Key: YOUR_API_KEY"
Get User Statistics

GET/api/get_stats.php

curl "https://storepanel.royalflood.site/api/get_stats.php" \
  -H "X-API-Key: YOUR_API_KEY"
Webhook (All Services)

When payment is successful, we send a POST request to your configured webhook URL.

Webhook Headers
X-Webhook-Signature: {signature}
X-Webhook-Id: {unique_id}
Content-Type: application/json
Webhook Payload (All Services)
{
  "event": "payment_success",
  "order_id": "ORDABC123XYZ",
  "payment_id": "PAY12345678",
  "customer_id": "CUST_001",
  "customer_name": "John Doe",
  "amount": 500,
  "qr_amount": 500.37,
  "utr": "123456789012",
  "product_name": "Premium Service",
  "service_used": "bharatpe",
  "verified_at": "25-05-2026 03:35:00 PM"
}

service_used can be: bharatpe, paytm, or famapp

Error Codes

HTTP StatusError MessageDescription
401Missing security headersAdd X-Request-Timestamp, X-Request-Nonce, X-Request-Signature headers
429Rate limit exceededSlow down your requests (max 100/minute)
400FamApp not configuredSetup FamApp in dashboard and wait for admin approval
400PayTM service not configuredSetup PayTM credentials in dashboard
400BharatPe service not configuredSetup BharatPe credentials in dashboard
400UTR already usedThis UTR number has been used for another transaction
400Payment link expired30 min for BharatPe/PayTM, 5 min for FamApp

Service Comparison

FeatureBharatPePayTMFamApp
Verification MethodManual UTR EntryAuto (One Click)Auto (One Click)
UTR Required?✅ Yes (12-16 digits)❌ No❌ No
Expiry Time30 minutes30 minutes5 minutes only!
WhatsApp Notification✅ Yes✅ Yes❌ No
Admin Approval Required❌ No❌ No✅ Yes