MG Grow Pay
Multi-Currency Gateway Docs
INR (₹) • PKR (₨)
Client Portal
Live Sandbox Test 1. Credentials 2. MD5 Sign 3. Trade Codes (INR & PKR) 4. Pay-In (Deposit) 5. Pay-In Callback 6. Pay-Out (Disbursement) 7. Pay-Out Callback 8. Payout Query 9. Balance Query 10. Return Codes (0-17) 11. Supported Banks (IN & PK)
Live Pay-In Cashier URL Test Generator
SANDBOX • PRODUCTION

Test live payment cashier links by selecting trade code (EP for Easypaisa, JZ for Jazzcash, or UPI for Indian UPI). Generates real MD5 signature on the fly and retrieves checkout link from gateway.

1. Merchant Credentials & Endpoints
Production Cluster

Use your assigned credentials to authenticate requests against the MG Grow Pay gateway:

2. MD5 Signature Algorithm
Security Protocol

Every request submitted to the gateway or callback received must be cryptographically signed:

PHP Implementation
function generate_mggrow_sign($params, $secret_key) { unset($params['sign']); ksort($params); $signPairs = []; foreach ($params as $k => $v) { if ($v !== "" && $v !== null) { $signPairs[] = $k . "=" . $v; } } $signStr = implode("&", $signPairs) . "&key=" . $secret_key; return strtolower(md5($signStr)); }
3. Official Trade Codes (pay_type)
INR • PKR

Use the exact string identifiers below for pay_type in collection and payout requests:

CurrencyChannelPay-In Trade CodePayout Trade CodeRemarks
INR (₹)Indian UPI (PhonePe, GPay, Paytm)UPIUPIInstant dynamic QR / Intent
INR (₹)Indian Direct Bank Transfer (IMPS/NEFT)—TRANSFERRequires bankCode (IFSC Code)
PKR (₨)Easypaisa Mobile WalletEPEPDirect wallet deposit & transfer
PKR (₨)Jazzcash Mobile WalletJZJZDirect wallet deposit & transfer
PKR (₨)1Link Commercial Banks—BANKRequires bankCode (HBL, Meezan, etc.)
4. Pay-In Collection API (POST /v1/Collect)
POST /v1/Collect

Initiates an Indian UPI or Pakistani Mobile Wallet deposit order and generates an instant payment routing link for the user.

ParameterTypeRequiredDescription
mchIdStringRequiredYour Merchant ID (e.g. YOUR_MCH_ID)
currencyStringRequiredINR or PKR
out_trade_noStringRequiredUnique serial order number on your platform
moneyIntegerRequiredDeposit amount (Integer only, no decimals)
pay_typeStringRequiredUPI for India, EP for Easypaisa, JZ for Jazzcash
attachStringOptionalCustom tracking metadata
notify_urlStringRequiredWebhook URL to receive payment status callback
returnUrlStringOptionalReturn URL where user lands after checkout
signStringRequiredCalculated MD5 signature hash
PHP Implementation (INR & PKR Deposit)
<?php // Prepare Deposit Parameters (INR or PKR) $params = [ 'mchId' => 'YOUR_MCH_ID', 'currency' => 'INR', // 'INR' or 'PKR' 'out_trade_no' => 'ORD' . date("YmdHis") . rand(100, 999), 'pay_type' => 'UPI', // 'UPI' (India) or 'EP' / 'JZ' (Pakistan) 'money' => 500, 'attach' => 'WebDeposit', 'notify_url' => 'https://yourwebsite.com/callback_payin.php', 'returnUrl' => 'https://yourwebsite.com/home.php', ]; // Generate MD5 Sign $params['sign'] = generate_mggrow_sign($params, 'YOUR_SECRET_KEY'); // Send POST to Gateway $ch = curl_init('https://api.wpay.life/v1/Collect'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']); $response = curl_exec($ch); curl_close($ch); $resData = json_decode($response, true); if (isset($resData['code']) && $resData['code'] == 0) { // Redirect user to payment cashier page $cashier_url = $resData['data']['url'] ?? $resData['data']['pay_url']; header("Location: " . $cashier_url); exit; } else { echo "Gateway Error: " . ($resData['msg'] ?? 'Initialization failed'); } ?>

Successful Gateway JSON Response:

JSON Response
{ "code": 0, "msg": "success", "data": { "out_trade_no": "ORD20261004001", "pay_url": "https://gateway.mggrow.sbs/checkout/pay?id=8f293b..." } }
5. Pay-In Webhook Callback Notification
POST callback_payin

When payment is completed by user, the gateway sends a POST request to your notify_url:

FieldTypeDescription
mchIdStringYour Merchant ID
out_trade_noStringMerchant order number
currencyStringINR or PKR
moneyNumberOriginal order amount
pay_moneyNumberUser's actual paid amount in cash
statusInteger1 = Payment Successful, 2 = Failed
signStringMD5 signature for callback verification
Merchant Callback Handler (callback_payin.php)
<?php // callback_payin.php $post_data = $_POST; $secret_key = "YOUR_SECRET_KEY"; // Verify Signature $incoming_sign = $post_data['sign'] ?? ''; unset($post_data['sign']); ksort($post_data); $signPairs = []; foreach ($post_data as $k => $v) { if ($v !== "" && $v !== null) { $signPairs[] = $k . "=" . $v; } } $calculated_sign = strtolower(md5(implode("&", $signPairs) . "&key=" . $secret_key)); if (strcasecmp($incoming_sign, $calculated_sign) === 0) { if (($post_data['status'] ?? '') == '1') { // Payment Succeeded! Credit user account $order_id = $post_data['out_trade_no']; $amount = $post_data['pay_money']; } // Strictly output string 'success' in plain text echo "success"; exit; } else { echo "sign error"; exit; } ?>
6. Pay-Out Disbursement Transfer API
POST /v1/Payout

Disburses instant payouts directly to Indian Bank Accounts (IMPS) / UPI VPAs or Pakistani Wallets (Easypaisa, Jazzcash) and 1Link Banks.

ParameterTypeRequiredDescription
mchIdStringRequiredMerchant ID
currencyStringRequiredINR or PKR
out_trade_noStringRequiredUnique payout ID generated by merchant (e.g. WD2026100409)
pay_typeStringRequiredUPI, TRANSFER (India) | EP, JZ, BANK (Pakistan)
moneyIntegerRequiredTransfer amount (Min: 100)
userNameStringRequiredBeneficiary Account Holder Name
accountStringRequiredBeneficiary Account Number, UPI VPA, or Mobile Wallet Number
bankCodeStringOptionalIFSC Code for India, Bank Name for 1Link Pakistan, or UPI/EP/JZ
notify_urlStringRequiredCallback webhook URL for payout confirmation
uidStringOptionalUser unique identifier
signStringRequiredCalculated MD5 Signature
cURL Request Example (INR IMPS & PKR Easypaisa)
# Sample 1: Pakistan Easypaisa (PKR) curl --location 'https://api.wpay.life/v1/Payout' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'mchId=YOUR_MCH_ID' \ --data-urlencode 'currency=PKR' \ --data-urlencode 'out_trade_no=WD20261004001' \ --data-urlencode 'pay_type=EP' \ --data-urlencode 'money=1000' \ --data-urlencode 'userName=Recipient Name' \ --data-urlencode 'account=03001234567' \ --data-urlencode 'notify_url=https://yourwebsite.com/callback_payout.php' \ --data-urlencode 'sign=calculated_md5_signature' # Sample 2: India Bank Transfer (INR) curl --location 'https://api.wpay.life/v1/Payout' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'mchId=YOUR_MCH_ID' \ --data-urlencode 'currency=INR' \ --data-urlencode 'out_trade_no=WD20261004002' \ --data-urlencode 'pay_type=TRANSFER' \ --data-urlencode 'money=1500' \ --data-urlencode 'userName=Rahul Sharma' \ --data-urlencode 'account=0235456782' \ --data-urlencode 'bankCode=HDFC0001234' \ --data-urlencode 'notify_url=https://yourwebsite.com/callback_payout.php' \ --data-urlencode 'sign=calculated_md5_signature'

Successful Response:

JSON Response
{ "code": 0, "msg": "success", "data": { "transaction_Id": "999cee57ddcf438595a7ab4fd2e5063e" } }
7. Pay-Out Webhook Callback Notification
POST callback_payout

When disbursement is processed by bank or wallet nodes, the result is posted to your notify_url:

POST Payload Received at notify_url
mchId=YOUR_MCH_ID&out_trade_no=WD20261004001&currency=INR&money=1000&real_money=1000.00&status=1&sign=callback_signature_hash

* Crucial: Your webhook receiver MUST output strictly: success in plain text.

8. Payout Status Inquiry API
POST /v1/Query/Payout

Query real-time transfer settlement status using your merchant order number (out_trade_no):

cURL Request
curl --location 'https://api.wpay.life/v1/Query/Payout' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'mchId=YOUR_MCH_ID' \ --data-urlencode 'out_trade_no=WD20261004001' \ --data-urlencode 'sign=calculated_signature'

Inquiry Response (JSON):

JSON Response
{ "code": 0, "msg": "success", "data": { "transaction_Id": "aca1ce79d1f64d29ac9d7f3b964d88fb", "mchId": "YOUR_MCH_ID", "out_trade_no": "WD20261004001", "status": 1, "money": 1000, "real_money": 1000.00, "currency": "INR" } }
9. Merchant Balance Query API
POST /v1/balance

Check your live INR or PKR balance available for instant settlements:

cURL Request
curl --location 'https://api.wpay.life/v1/balance' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'mchId=YOUR_MCH_ID' \ --data-urlencode 'currency=INR' \ --data-urlencode 'sign=calculated_signature'
JSON Response
{ "code": 0, "msg": "success", "data": { "balance": 50000.00, "currency": "INR" } }
10. Gateway Return & Error Codes (0 - 17)
Standard Error Codes

All gateway API responses return a status code inside the code field:

CodeStatusDescription
0SuccessOperation processed / submitted successfully
1FailGeneral operation failure
2mchId errorMerchant ID does not exist or incorrect
3Account errorAccount does not exist
4Status errorAccount status abnormal or locked
5Signature errorSignature MD5 verification failed
6DuplicateOrder number already exists in system
7Not foundOrder does not exist
8PermissionInsufficient permissions for this endpoint
9BalanceInsufficient balance in merchant vault
10Amount errorIncorrect amount or violates min/max limits
11MaintenancePayment channel under scheduled maintenance
12Currency errorCurrency does not exist
13Channel errorChannel code does not exist
15Channel failureUpstream bank / wallet channel temporary failure
16IP Not WhitelistedServer IP incorrect. Contact support to whitelist server IP
17Bank errorBank code / IFSC does not exist
11. Supported Banking & Wallet Channels
Multi-Currency Network

Indian Channels (INR ₹): Instant settlements supported across all UPI apps and major Indian commercial banks:

PhonePe UPI (UPI)
Google Pay (GPay)
Paytm Wallet & UPI
BHIM UPI (NPCI)
State Bank of India (SBI)
HDFC Bank Limited
ICICI Bank Limited
Axis Bank Limited
Punjab National Bank (PNB)
Kotak Mahindra Bank
Bank of Baroda (BOB)
Canara Bank

Pakistani Channels (PKR ₨): Real-time deposits and payouts supported across mobile wallets and 1Link banks:

Easypaisa Mobile Wallet (EP)
JazzCash Mobile Wallet (JZ)
Habib Bank Limited (HBL)
Meezan Bank Limited
United Bank Limited (UBL)
MCB Bank Limited
Bank Alfalah Limited
Allied Bank Limited (ABL)
Faysal Bank Limited
Askari Bank Limited
The Bank of Punjab (BOP)
Standard Chartered Pakistan