Payin Redirect
Initiate a payin using a structured POST request with secure redirection.
Endpoint: /ProcessPayment/initiate_payment/
Request Parameters:
| Field | Description |
|---|---|
| order_id | Unique identifier for the transaction |
| amount | Payment amount in rupees |
| Customer's email address | |
| merchant_key | Your assigned merchant key |
| name | Customer's full name |
| phone | Customer's mobile number (10 Digit Number) |
| return_url | Encoded URL to redirect after payment |
| hash | Secure 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:
- Sort the parameters by key.
- Concatenate the values of the sorted parameters, separated by a pipe (
|). - Generate the hash using HMAC with SHA-256, using the
merchant_secretas 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