Skip to main content

Payin Intent

Initiate a payin using a structured POST request.

Endpoint: /StartPayment/initiate_payment/

Request Parameters:

FieldDescription
order_idUnique identifier for the transaction
amountPayment amount
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 (Optional)
hashSecure 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:

  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",
"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