V - Signed (Header)


V-Sign (Header) Calculation

The message level security is implemented by using signing and verification of the message.

CONSTRUCT SOURCE STRING

  • The source string should be formed with elements, construct with 'secret-Key' and value pair data.
  • The elements should then be sorted in ascending order, case-insensitive.
  • Each element should without any character in between them.
  • Below is a sample of 'V-Sign' value pairs:
Example: API Input (V-Signed)
{
"successRedirectURL": "https://SuccessRedirectURL.com/SuccessTransactionStatus",
"failedRedirectURL": "https://FailedRedirectURL.com/FailedTransactionStatus",
"callbackURL": "https://MerchantCallbackURL.com/StatusCallbackURL",
"currencyCode": "MYR",
"bankCode": "MBB",
"amount": 63.85,
"referCode": "REF1234509897",
"ownerBy": "BestTitan"
}

Step 1: The elements should then be sorted in ascending order, case-insensitive.

{
"amount": 63.85,
"bankCode": "MBB",
"callbackURL": "https://MerchantCallbackURL.com/StatusCallbackURL",
"currencyCode": "MYR",
"failedRedirectURL": "https://FailedRedirectURL.com/FailedTransactionStatus",
"ownerBy": "BestTitan",
"referCode": "REF1234509897",
"successRedirectURL": "https://SuccessRedirectURL.com/SuccessTransactionStatus"
}

Step 2: Below is sample of constructed source string by using 'SecretKey' value pairs above:

acceding-input = 63.85+MBB+https://MerchantCallbackURL.com/StatusCallbackURLMYR
            +https://FailedRedirectURL.com/FailedTransactionStatus+BestTitan+REF1234509897
            +https://SuccessRedirectURL.com/SuccessTransactionStatusacceding-input
            = 63.85MBBhttps://MerchantCallbackURL.com/StatusCallbackURLMYR
            https://FailedRedirectURL.com/FailedTransactionStatusBestTitanREF1234509897
            https://SuccessRedirectURL.com/SuccessTransactionStatus

Step 3: ( V-Signed Generate ) HMAC-SHA256

V-Signed = hmac-sha256(63.85MBBhttps://MerchantCallbackURL.com/StatusCallbackURLMYR
           https://FailedRedirectURL.com/FailedTransactionStatusBestTitanREF1234509897
           https://SuccessRedirectURL.com/SuccessTransactionStatus , CkRFd5eJ8ZEIYqGo6Yqbq7JlwSUyIwpj)
V-Signed = df9624be1215d8b51add72a5bfd097565ca4bcb6d748c10c590e1f949225ac62

Updated over 0 months Ago