Submerchant PF record is created as inactive after adding by add submerchant API. Webhook notification is sent when pf record definitions are completed and status is changed to active.
The hash key will be sent for further verification from merchant’s site. Encrypting algorithm is given below.


Type Hey Name URL
PF Webhook any_key_name https://merchant.site/getWebook

Parameters Types Sample
status_code digits 100
merchant_id digits 98950
pf_id digits 79520
message string PF Activated
hash_key string 9fgrtyhs874sgsatardfgs$sdg842tnj2tjj


    generateSubMerchantPFHashKey($merchant_key, $pf_id, $app_secret) {
    $data = $merchant_key.'|'.$pf_id;
    $iv = substr(sha1(mt_rand()), 0, 16);
    $password = sha1($app_secret);
    $salt = substr(sha1(mt_rand()), 0, 4);
    $saltWithPassword = hash('sha256', $password . $salt);
    $encrypted = openssl_encrypt(
        "$data", 'aes-256-cbc', "$saltWithPassword", null, $iv
    $msg_encrypted_bundle = "$iv:$salt:$encrypted";
    $hash_key = str_replace('/', '__', $msg_encrypted_bundle);
    return $hash_key;