Payin Intent
Initiate a payin using a structured POST request.
Endpoint: /StartPayment/initiate_payment/
Request Parameters:
| Field | Description |
|---|---|
| order_id | Unique identifier for the transaction |
| amount | Payment amount |
| 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 (Optional) |
| hash | Secure HMAC SHA-256 hash |
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",
"method": "1",
"message": "Transaction initiated successfully",
"data": {
"transaction_id": "2025000000155906",
"merchant_ref_no": "1000000",
"amount": "1000",
"links": {
"upi": "upi://pay?pa=.....",
}
}
}
Error Responses:
-
Missing Fields:
ERR100 -
Invalid Merchant Key:
ERR001 -
Hash Mismatch:
ERR002