Calculation of Signature

Here is a great doc on the Request Signature that will help.

Alternatively here is our sample Postman Collection that you can download and look at the Pre-request Script.

var timestamp = (Math.floor(new Date().getTime() / 1000) - 10).toString();
postman.setGlobalVariable("rapyd_request_timestamp", timestamp);

var signature_salt = CryptoJS.lib.WordArray.random(12);
postman.setGlobalVariable("rapyd_signature_salt", signature_salt);

var body = '';
if (JSON.stringify(request.data) !== '{}' && request.data !== '' && typeof request.data !=='object' ){
body = JSON.stringify(JSON.parse(request.data));
}

var secret = pm.environment.get('rapyd_secret_key');
var to_sign = request.method.toLowerCase() + request.url.replace('{{base_uri}}','/v1') + signature_salt + timestamp + pm.environment.get('rapyd_access_key') + secret + body;

console.log("to_sign " + to_sign);
var rapyd_signature = CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA256(to_sign, secret));
rapyd_signature = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(rapyd_signature));
console.log("rapyd_signature " + rapyd_signature);
postman.setGlobalVariable("rapyd_signature", rapyd_signature);