Presentation logo

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-dev). Please pay attention at the request version that you are using.

PHP Example

Generate signature (PHP example)



$merchant_id = "Test-Integration-Merchant"; // Your Merchant Account ID 
$merchant_secret = "MerchantSecretKey"; // Your Merchant Secret
$request = [
    "frontend" => "Integration TEST USD",
    "merchant_id" => "Test-Integration-Merchant",
    "trace_id" => "752856",
    "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