Skip to main content

Payin Redirect

Initiate a payin using a structured POST request with secure redirection.

Endpoint: /ProcessPayment/initiate_payment/


Request Parameters:

FieldDescription
order_idUnique identifier for the transaction
amountPayment amount in rupees
emailCustomer's email address
merchant_keyYour assigned merchant key
nameCustomer's full name
phoneCustomer's mobile number (10 Digit Number)
return_urlEncoded URL to redirect after payment
hashSecure HMAC SHA-256 hash of the request

Initiating Response

{
"status" : "success",
"transaction_id": "TX123455",
"payment_url" : "https://paymentUrl",
"merchant_ref" : "MER14321",
"amount" : "1000",
"return_url" : "https://return_url",
}

Hash Generation

Before sending the request, you must generate a hash to secure the request. The hash is generated using the following steps:

  1. Sort the parameters by key.
  2. Concatenate the values of the sorted parameters, separated by a pipe (|).
  3. Generate the hash using HMAC with SHA-256, using the merchant_secret as the key.

Example Hash Generation:

  • Message to be hashed: amount|email|merchant_key|name|order_id|phone|url encoded return_url
  • Hashing function: hash_hmac('sha256', message, merchant_secret, false)

Success Response

{
"status": "success",
"message": "Transaction status retrieved successfully",
"data": {
"transaction_id": "2025000000155906",
"status": "Success",
"amount": "1000",
"customer_upi_id": "john.doe@upi",
"utr": "326123654789",
"merchant_reference": "ORD10001",
"transaction_date_time": "2025-06-23 12:45:03",
"merchant_id": "MER12345"
}
}

Error Responses:

  • Missing Fields: ERR100

  • Invalid Merchant Key: ERR001

  • Hash Mismatch: ERR002