Skip to main content

Payout Initiate

Initiate a payout using a structured POST request.

Same merchant_key and merchant_secret For Both Payin and Payout


Endpoint

POST: /StartPayout/initiate_payout


Request Parameters

FieldDescription
nameBeneficiary full name
amountPayout amount
merchant_keyYour assigned merchant key
bank_accountBeneficiary bank account number
bank_ifscBank IFSC code
bank_nameBeneficiary bank name
order_idUnique merchant order ID/reference
hashSecure HMAC SHA-256 hash

Hash Generation

To secure the request, generate a hash using these steps:

  1. Sort the parameters by key (alphabetically).
    Example order:
    amount, bank_account, bank_ifsc, bank_name, merchant_key, name,order_id,

  2. Concatenate the values of the sorted parameters, separated by a pipe |.

  3. Generate the hash using HMAC SHA-256 with your merchant_secret as the key.


Example Hash Generation

  • Message to be hashed:
    amount|bank_account|bank_ifsc|bank_name|merchant_key|name|order_id

  • Hashing function (PHP):

$formData = [
'order_id' => $orderId,
'amount' => $amount,
'merchant_key' => $merchant_key,
'name' => $name,
'bank_account' => $bankaccount,
'bank_ifsc' => $bankifsc,
'bank_name' => $bankname
];

// Hash generation
ksort($formData);
$hashString = implode('|', array_values($formData));
$hash = hash_hmac('sha256', $hashString, $merchant_secret, false);
$formData['hash'] = $hash;

// Send payout request
$ch = curl_init($payment_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $formData);
$response = curl_exec($ch);
curl_close($ch);

// Response Handling
$responseData = json_decode($response, true);

Request Example (JSON)

{
"data": {
"name": "Ajay Verma",
"amount": "100.00",
"bank_account": "1234567890",
"bank_ifsc": "HDFC0001234",
"bank_name": "HDFC Bank",
"merchant_key": "MerKey123",
"order_id": "ORD123456",
"hash": "GENERATED_SHA256_HASH"
},

}

Callback Response

{
'reference_id' => "PAYOUT1234567890",
'status' =>"'Success'",
'amount' => "100.00",
'utr' => "UTR987654321",
'account' => "1234567890",
'ifsc' => "HDFC0001234",
'merchant_order' => "ORD123456"

}

Error Responses:

  • Missing required fields: ERR100

  • Invalid Merchant Key: ERR001

  • Hash Mismatch: ERR002

  • Insufficient balance: ERR005