1. Home
  2. CollegePAY WEB
  3. Transaction Payment Leg
  4. Request Hash Calculation

Request Hash Calculation


The following fields are to be combined and hashed using SHA512 algorithm and this private hash key assigned to the hash POST field:-

  • txn_ref
  • product_id
  • pay_item_id
  • amount
  • site_redirect_url
  • MacKey

where ‘+’ represents string concatenation of values (i.e, “a” + “b” = “ab”).

Please note the order of the parameters.

Mac Key:-

This is a 128 character alphanumeric string that is used to calculate the hash. It is usually provided when the merchant is about to Go Live (i.e start accepting real payments). For DEMO transactions, the following value should be used:-


Please be wary of extra characters and spaces when working with the MAC Key and hash computation.


Hash Computation Example

For example for a transaction with the following field values –

1) txn_ref – MYC_060616_31

2) product_id – 6207

3) pay_item_id – 103

4) amount – 125000 (i.e ₦1,250)

5) site_redirect_url – http://www.myhigherinstitution.com/response/

6) MacKey –



String to be hashed =



After computing value…


Hash =


A good resource where you can check the hash you;re generating can be found at the link below-

SHA 512 Generator

Was this article helpful to you? Yes No

How can we help?