Praxis Wiki logo

Overview How to build a signature


Request signature is built as follows:

  1. Merchant ID is added to request parameters as "merchant_id":"..."
  2. API version is added to request parameters as "version":"1.1"
  3. all parameter keys are taken in alphabetical order
  4. corresponding parameter values are concatenated into a string
  5. Merchant Secret is appended in the end of the string
  6. resulting string is hashed with sha384 - signature
  7. signature parameter is added to the request JSON

Please checkout the online generator and validator to test your code.

{danger.fa-exclamation} IMPORTANT: Current encryption algorithm applies to API version 1.1 (document version 3.1). Please pay attention at the request version that you are using.

PHP Example

Generate signature (PHP example)

// Signature builds for all request according to single criteria

// Your request data
$data = ['your_variable_key_1' => 'your_variable_value_1', 'your_variable_key_2' => 'your_variable_value_2', 'your_variable_key_3' => 'your_variable_value_3'];

$merchant_id = "Test-Integration-Merchant"; // Your Merchant Account ID 
$merchant_secret = "MerchantSecretKey"; // Your Merchant Secret
$request = [
    "your_variable_key_1" => "your_variable_value_1", 
    "your_variable_key_2" => "your_variable_value_2",
    "your_variable_key_3" => 'your_variable_value_3",
    "merchant_id" => $merchant_id,
    "timestamp" => 1559825373,
    "version" => "1.1"

ksort($request); // Sort request array by keys ASC

$concatenated_string = implode('', $request) . $merchant_secret; // Concatenate Merchant Secret Key with request params
// Integration TEST USDTest-Integration-Merchant15598253737528561.1MerchantSecretKey

$signature = hash('sha384', $concatenated_string); // Generate HASH of concatenated string
// c1eb4464bce78dd099501fbdbc6c9b9979070b4d82ef47fbbfbf9535104934d4abd77bfd9480685b317d60db5339097b

You are currently viewing version 3.1 Latest API version here