Hash should always be calculated at your server.
Hash required to make payment.
sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||salt)
Code samples to generate hash are present here - JAVA,PHP.
When doing Recurring(SI) transaction, Payment hash need to be calculated as mentioned here
To call any PayU API, you need to generate hash from your server using following pattern :
sha512(key|command|var1|salt)wherekey=YOUR KEYcommand=Api Commandssalt= YOUR SALTvar1= default(if you want stored cards use var1 as user_credentials else default)