Praxis Wiki logo

API Functions How to build a signature


Signature is built as follows:

  1. all parameter keys are taken in alphabetical order
  2. corresponding parameter values are concatenated into a string
  3. WSPassCode is prepended in the beginning of the string
  4. resulting string is hashed with sha256 - signature
  5. signature parameter is added to the request JSON

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

PHP Example

Generate signature (PHP example)



$secret = 'testapi123'; // Your WSPassCode
$request = [
    "frontend" => "Integration TEST USD",
    "trace_id" => "752856",
    "timestamp" => 1559825373

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

$concatenated_string = implode('', $request) . $secret; // Concatenate WSPassCode with request params
// testapi123Integration TEST USD1559825373752856

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

You are currently viewing version 3.0 Latest API version here