Moklo Pay
Developer API Manual
Merchant Sign In
Pakistan (PKR ₨)
India (INR ₹)
Bangladesh (BDT ৳)
United States (USD $)
UAE (AED د.إ)
1. Pay-In / Cashier Checkout API
GET / POST Redirect

Redirect customer to our cashier endpoint. Supports EasyPaisa, JazzCash, All Commercial Banks & Raast QR:

https://pay.moklopay.com/pay/
ParameterTypeRequirementDescription
mch_idStringRequiredYour Merchant ID (e.g. YOUR_MCH_ID)
amountNumberRequiredPay-In amount in PKR (e.g. 1000)
order_idStringRequiredUnique order serial generated on your platform
channelStringRequiredep (EasyPaisa), jz (JazzCash), bank (All Banks QR)
notify_urlStringRequiredYour server webhook URL to receive payment confirmation
return_urlStringOptionalCustomer return page after payment completion
PHP Pay-In Redirect Example
<?php
$mch_id   = 'YOUR_MCH_ID';
$endpoint = 'https://pay.moklopay.com/pay/';

$params = [
    'mch_id'     => $mch_id,
    'amount'     => 1000.00,
    'order_id'   => 'ORD' . date('YmdHis') . rand(100, 999),
    'channel'    => 'ep', // Options: 'ep', 'jz', 'bank'
    'notify_url' => 'https://yourwebsite.com/backend.php',
    'return_url' => 'https://yourwebsite.com/return.php'
];

header("Location: " . $endpoint . "?" . http_build_query($params));
exit;
?>
Pay-In Webhook Receiver (backend.php)
PHP Webhook Receiver (backend.php)
<?php
$secret_key = 'YOUR_API_KEY';
$params     = $_POST;
$sign       = strtolower(trim($params['sign'] ?? ''));

unset($params['sign']);
ksort($params);

$signPairs = [];
foreach ($params as $k => $v) {
    if ($v !== "" && $v !== null) $signPairs[] = $k . "=" . $v;
}
$calculated_sign = strtolower(md5(implode("&", $signPairs) . "&key=" . $secret_key));

if (strcasecmp($sign, $calculated_sign) === 0 && ($params['status'] ?? '') === '1') {
    // 1. Fetch Order: $order_id = $params['out_trade_no'];
    // 2. Credit Player: $amount = $params['pay_money'];
    // 3. Mark Order Completed
    echo "success";
    exit;
}
echo "fail";
?>
2. Automated Payout / Disbursement API
POST / Server-to-Server (Zero OTP)

Send direct server-to-server HTTP POST requests to transfer funds to EasyPaisa, JazzCash, 1Link Bank, or USDT without any 2FA or OTP prompt:

https://payout.moklopay.com/payout/
ParameterTypeRequirementDescription
mchIdStringRequiredYour Merchant ID (YOUR_MCH_ID)
out_trade_noStringRequiredUnique payout order serial from your platform
moneyNumberRequiredTransfer amount in PKR
pay_typeStringRequiredEP (EasyPaisa), JZ (JazzCash), BANK, USDT
accountStringRequiredReceiver Mobile Number, IBAN, or USDT Wallet Address
userNameStringRequiredReceiver Full Account Title
notify_urlStringRequiredWebhook URL to receive final payout status
signStringRequiredMD5 signature: md5(alphabetized_params + "&key=api_key")
PHP Payout Dispatch Script
<?php
$mch_id   = 'YOUR_MCH_ID';
$api_key  = 'YOUR_API_KEY';
$endpoint = 'https://payout.moklopay.com/payout/';

$data = [
    'mchId'        => $mch_id,
    'out_trade_no' => 'WD' . date('YmdHis') . rand(100, 999),
    'money'        => 2500.00,
    'pay_type'     => 'EP', // Options: 'EP', 'JZ', 'BANK', 'USDT'
    'account'      => '03001234567',
    'userName'     => 'Muhammad Ali',
    'notify_url'   => 'https://yourwebsite.com/payout_callback.php'
];

ksort($data);
$signPairs = [];
foreach ($data as $k => $v) {
    if ($v !== "" && $v !== null) $signPairs[] = $k . "=" . $v;
}
$data['sign'] = strtolower(md5(implode("&", $signPairs) . "&key=" . $api_key));

$ch = curl_init($endpoint);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec($ch);
curl_close($ch);

$result = json_decode($res, true);
if ($result && ($result['code'] ?? -1) === 0) {
    echo "Payout Queued! Payout ID: " . $result['payout_id'];
} else {
    echo "Error: " . ($result['msg'] ?? 'Request declined');
}
?>
3. Realtime Balance Query API
POST / Instant JSON

Query current merchant ledger balance directly from external game servers or cashier scripts:

https://balance.moklopay.com/balance/
PHP Balance Check Script
<?php
$mch_id   = 'YOUR_MCH_ID';
$api_key  = 'YOUR_API_KEY';
$endpoint = 'https://balance.moklopay.com/balance/';

$params = [
    'mchId'    => $mch_id,
    'currency' => 'PKR'
];

ksort($params);
$signPairs = [];
foreach ($params as $k => $v) {
    if ($v !== "" && $v !== null) $signPairs[] = $k . "=" . $v;
}
$params['sign'] = strtolower(md5(implode("&", $signPairs) . "&key=" . $api_key));

$ch = curl_init($endpoint);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec($ch);
curl_close($ch);

$data = json_decode($res, true);
echo "Current Ledger Balance: ₨ " . ($data['data']['balance'] ?? '0.00');
?>

Documents Not Available

Integration specifications and endpoints for this region are currently under scheduled deployment. Please check back soon or switch back to Pakistan (PKR ₨).

© 2026 Moklo Pay • https://moklopay.com/
Copied!