Skip to main content

Signatures/Hash

A signature is a rule used to verify either merchants' requests to a payment platform or the callbacks from the payment platform to merchants' system.

caution

Resultant Signature/Hash value should be lowercase.

Authentication Signature/Hash

Example Using CryptoJSvar Javascript library
/*
* Library Source: https://www.npmjs.com/package/crypto-js
*/
// Step 1: Generate string
var requestString = order.number + order.amount + order.currency + order.description + merchant.password;
// Step 2: Convert generated string to UpperCase.
requestString = requestString.toUpperCase();
// Step 3: Calculate md5 of resultant string from step 2.
var md5String = CryptoJS.MD5(requestString).toString();
// Step 4: Calculate SHA1 of resultant MD5 String from step 3.
var sha1String = CryptoJS.SHA1(md5String)
// Step 5: Convert SHA1 string to ciphertext
var hashString = CryptoJS.enc.Hex.stringify(sha1String);

Recurring Signature/Hash

Example Using CryptoJSvar Javascript library
/*
* Library Source: https://www.npmjs.com/package/crypto-js
*/
// Step 1: Generate string
var requestString = recurring_init_trans_id + recurring_token + order.number + order.amount + order.description + merchant.password;
// Step 2: Convert generated string to UpperCase.
requestString = requestString.toUpperCase();
// Step 3: Calculate md5 of resultant string from step 2.
var md5String = CryptoJS.MD5(requestString).toString();
// Step 4: Calculate SHA1 of resultant MD5 String from step 3.
var sha1String = CryptoJS.SHA1(md5String)
// Step 5: Convert SHA1 string to ciphertext
var hashString = CryptoJS.enc.Hex.stringify(sha1String);

Refund Signature/Hash

Example Using CryptoJSvar Javascript library
/*
* Library Source: https://www.npmjs.com/package/crypto-js
*/
// Step 1: Generate string
var requestString = payment.id + order.amount + merchant.password;
// Step 2: Convert generated string to UpperCase.
requestString = requestString.toUpperCase();
// Step 3: Calculate md5 of resultant string from step 2.
var md5String = CryptoJS.MD5(requestString).toString();
// Step 4: Calculate SHA1 of resultant MD5 String from step 3.
var sha1String = CryptoJS.SHA1(md5String)
// Step 5: Convert SHA1 string to ciphertext
var hashString = CryptoJS.enc.Hex.stringify(sha1String);

Void Signature/Hash

Example Using CryptoJSvar Javascript library
/*
* Library Source: https://www.npmjs.com/package/crypto-js
*/
// Step 1: Generate string
var requestString = payment.id + order.amount + merchant.password;
// Step 2: Convert generated string to UpperCase.
requestString = requestString.toUpperCase();
// Step 3: Calculate md5 of resultant string from step 2.
var md5String = CryptoJS.MD5(requestString).toString();
// Step 4: Calculate SHA1 of resultant MD5 String from step 3.
var sha1String = CryptoJS.SHA1(md5String)
// Step 5: Convert SHA1 string to ciphertext
var hashString = CryptoJS.enc.Hex.stringify(sha1String);

Check Status Signature/Hash

Example Using CryptoJSvar Javascript library
/*
* Library Source: https://www.npmjs.com/package/crypto-js
*/
// Step 1: Generate string
var requestString = payment.id + merchant.pass;
// Step 2: Convert generated string to UpperCase.
requestString = requestString.toUpperCase();
// Step 3: Calculate md5 of resultant string from step 2.
var md5String = CryptoJS.MD5(requestString).toString();
// Step 4: Calculate SHA1 of resultant MD5 String from step 3.
var sha1String = CryptoJS.SHA1(md5String)
// Step 5: Convert SHA1 string to ciphertext
var hashString = CryptoJS.enc.Hex.stringify(sha1String);

Callback Notification Signature/Hash

Example Using CryptoJSvar Javascript library
/*
* Library Source: https://www.npmjs.com/package/crypto-js
*/
// Step 1: Generate string
var requestString = payment_id + order.number + order.amount + order.currency + order.description + merchant.password;
// Step 2: Convert generated string to UpperCase.
requestString = requestString.toUpperCase();
// Step 3: Calculate md5 of resultant string from step 2.
var md5String = CryptoJS.MD5(requestString).toString();
// Step 4: Calculate SHA1 of resultant MD5 String from step 3.
var sha1String = CryptoJS.SHA1(md5String)
// Step 5: Convert SHA1 string to ciphertext
var hashString = CryptoJS.enc.Hex.stringify(sha1String);

Success/Cancel Url Signature/Hash

Example Using CryptoJSvar Javascript library
/*
* Library Source: https://www.npmjs.com/package/crypto-js
*/
// Step 1: Generate string
var requestString = payment_public_id + order.number + order.amount + order.currency + order.description + merchant.password;
// Step 2: Convert generated string to UpperCase.
requestString = requestString.toUpperCase();
// Step 3: Calculate md5 of resultant string from step 2.
var md5String = CryptoJS.MD5(requestString).toString();
// Step 4: Calculate SHA1 of resultant MD5 String from step 3.
var sha1String = CryptoJS.SHA1(md5String)
// Step 5: Convert SHA1 string to ciphertext
var hashString = CryptoJS.enc.Hex.stringify(sha1String);