Skip to main content

Check Payout Balance

Endpoint

POST: /Checkbalance/check_balance/


Payload Required Fields

  • merchant_key: Your assigned merchant key
  • hash: HMAC-SHA256 hash generated using merchant_secret

Sample Request (PHP)

// Payload: only merchant_key + hash (HMAC-SHA256 over "merchant_key")
$formData = ['merchant_key' => $merchant_key];
ksort($formData);
$hashString = implode('|', array_values($formData));
$hash = hash_hmac('sha256', $hashString, $merchant_secret, false);

$postData = [
'merchant_key' => $merchant_key,
'hash' => $hash,
];

// CURL POST
$ch = curl_init($balance_url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($postData),
CURLOPT_HTTPHEADER => ['Content-Type: application/x-www-form-urlencoded'],
CURLOPT_TIMEOUT => 30,
CURLOPT_CONNECTTIMEOUT => 15,
]);
$result = curl_exec($ch);

Sample Response

{
"status": "success",
"message": "Balance retrieved successfully",
"data": {
"merchant_id": "1234",
"balance": 200,
"currency": "INR",
"updated_at": null
}
}

Status Values

  • Balance retrieved successfully: success
  • Error retrieving balance: failed