Check Payout Status
Endpoint: /Payoutstatus/check_status/
HTTP Method: POST
Request Parameters:
| Field | Description |
|---|---|
| merchant_key | Your Budypay merchant key |
| order_id | The unique transaction/order ID |
| hash | HMAC SHA-256 of `merchant_key |
Sample Code
$formData = [
'merchant_key' => $merchant_key,
'order_id' => $order_id
];
ksort($formData);
$message = implode('|', array_values($formData));
$hash = hash_hmac('sha256', $message, $merchant_secret, false);
// Prepare payload
$postData = [
'merchant_key' => $merchant_key,
'order_id' => $order_id,
'hash' => $hash
];
// cURL request
$ch = curl_init($api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData));
curl_setopt($ch, CURLOPT_POST, true);
$result = curl_exec($ch);
if (curl_errno($ch)) {
$error = 'cURL Error: ' . curl_error($ch);
} else {
$response = json_decode($result, true);
}
Sample Response
{
"data": {
"reference_id": "PAYOUT1234567890",
"status": "Success",
"amount": "100.00",
"utr": "UTR987654321",
"account": "1234567890",
"ifsc": "HDFC0001234",
"merchant_order": "ORD123456"
}
}
Status Values:
-
Payout completed successfully:
Success -
Payout is being processed:
Pending -
Failed Payout failed due to an error:
Failed
Error Responses:
-
Missing Fields:
ERR100 -
Invalid Merchant Key:
ERR001 -
Hash Mismatch:
ERR002 -
Transaction Not Found:
ERR003