X - Signature (Verification Callback)


X Signature Calculation

  • Verification of Key from Callback Result
  • The message level security is implemented by using signing and verification of the message.
  • Please study the callback merchant based on different service's callback page

STEP 1 - CONSTRUCT SOURCE STRING

  • The source string should be formed with elements, construct with key and value pair data.
  • According to 'Key' should then be sorted in ascending order, case-insensitive.
  • Each element should without any character in between them.
  • Below is a sample of element value pairs:
{
    "referCode": "RF-5242214199",
    "docNo": "WD8888888888", 
    "amount": 87.8787, 
    "transType": "DEPOSIT", 
    "transStatus": "PENDING", 
    "currencyCode": "MYR", 
    "fromBankCode": "HLB", 
    "fee": 1.6162, 
    "createdBy": "transaction_user_owner", 
    "createdAt": "2022-01-04 13:29:46"
}
  • Below is sample of constructed source string by using element value pairs above:
  • When submitting the amount please ensure that it includes exactly four decimal places.
    - For example to meet the formatting criteria:
    incorrectshould be entered
    8888.0000
    188.01188.0100
    11.0000
{
    "amount": 87.8787,
    "createdAt": "2022-01-04 13:29:46",
    "createdBy": "transaction_user_owner",
    "currencyCode": "MYR",
    "docNo": "WD8888888888",
    "fee": 1.6162,
    "fromBankCode": "HLB",
    "referCode": "RF-5242214199",
    "transStatus": "PENDING",
    "transType": "DEPOSIT"
}
87.87872022-01-04 13:29:46transaction_user_ownerMYRWD88888888881.6162HLBRF-5242214199PENDINGDEPOSIT

STEP 2 - SIGN THE SOURCE STRING

Get your XSignature 'secret-Key' from setting page.

Sign the constructed source string in step #1 using HMAC_SHA256 and the shared XSignature 'SecretKey'.

Below is a sample of constructed source string:

22be4d9d6bfdd0b20c7293c33078119324b886fe2782a2a8c3d060f564a8cb4e

Updated over 0 months Ago