Hashing
Useful Tip
Paga API includes a header parameter called a hash.
Hash utilises SHA-512 cryptographic encryption mechanism.
Across Paga API, you’ll be mandated to parse a header parameter called hash, the variable required to create the hash will vary across the respective endpoint you’re consuming.
How to create a hash for your request
-
Confirm the API end-point header requires a hash.
- We will use Deposit To Bank as a case study. This end-point requires a hash in the request header
-
Concatenate the parameter value in the order specified in the documentation.
- The Deposit To Bank hash are
Hash Requirement Example Input Description referenceNumber 3300932297 A unique reference number representing this request. amount 5000 Amount to send. destinationBankUUID 10 An id uniquely identifying a Bank on Paga. destinationBankAccountNumber 0000000000 The Paga bank UUID identifying the bank to which the deposit will be made. hashkey d9257ca... Your hashkey is the same as HMAC. You can retrieved from your Paga Business Account dashboard The concatenated string is formed using (referenceNumber + amount + destinationBankUUID + destinationBankAccountNumber + hashkey) to become
33009322975000100000000000d9257ca...
HashKey
Your hash-key is the same as HMAC you retrieved from your Paga Business Account dashboard.
-
Encrypt concatenated string with SHA-512 algorithm.
a. Encrypt the string generated string using SHA-512. You may use this tool here.
Updated over 2 years ago