refund.partially_refund.refund endpoint.The parameters and their order to be used for the hash algorithmare as follows.amount invoice_id merchant_key app_secret
#!/usr/bin/env bash
Â
generate_hash_key() {
 local amount="$1"
 local invoice_id="$2"
 local merchant_key="$3"
 local app_secret="$4"
Â
 local data="${amount}|${invoice_id}|${merchant_key}"
Â
 local iv
 iv=$(openssl rand -hex 16 | openssl sha1 | awk '{print $2}' | cut -c1-16)
Â
 local password
 password=$(printf "%s" "$app_secret" | openssl sha1 | awk '{print $2}')
Â
 local salt
 salt=$(openssl rand -hex 16 | openssl sha1 | awk '{print $2}' | cut -c1-4)
Â
 local salt_with_password
 salt_with_password=$(printf "%s" "${password}${salt}" | openssl sha256 | awk '{print $2}' | cut -c1-32)
Â
 local key_hex
 key_hex=$(printf "%s" "$salt_with_password" | xxd -p -c 256)
Â
 local iv_hex
 iv_hex=$(printf "%s" "$iv" | xxd -p -c 256)
Â
 local encrypted_base64
 encrypted_base64=$(printf "%s" "$data" | openssl enc -aes-256-cbc -K "$key_hex" -iv "$iv_hex" -base64)
Â
 local msg="${iv}:${salt}:${encrypted_base64}"
 msg="${msg//\//__}"
Â
 echo "$msg"
}
Â
amount="100.50"
invoice_id="INV-2026-0001"
merchant_key="test_merchant_123"
app_secret="my_secret_key_456"
Â
result=$(generate_hash_key "$amount" "$invoice_id" "$merchant_key" "$app_secret")
echo "Hash Key: $result"{
"status_code": 100,
"status_description": "Refund completed successfully",
"order_no": "VP17695816358637973",
"invoice_id": "CPIKQUM29TXMQFF-1769581631",
"ref_no": "602800085396",
"ref_number": "602800085396"
}