Net Banking Consent Transaction

This section provides the request parameters, sample request and response for a Net Banking Recurring Payment consent transaction or Consent transaction.

πŸ“˜

Note:

During integration with PayU, first integrate with the Test Server environment. PayU will provide you the necessary Merchant Key for the test serve. After testing is done, you are ready to move to the Production server.

HTTP Method: POST

Environment

Request parameters

ParameterDescriptionValue
key
mandatory
String The merchant key is a unique identifier for a merchant account in PayU's database.Your Test Key
api_version
optional
String The API version for this API.7
txnid
mandatory
String The transaction ID is a reference number for a specific order that is generated by the merchant. It is used to track the order and must be unique. PayU's system will not accept duplicate transaction IDs.
Note: Ensure that the transaction ID sent to us has not been successful earlier. In case of this duplication, the customer would get an error of β€˜duplicate Order ID.’
s7hhDQVWvbhBdN
amount
mandatory
String This field should contain the payment amount for the transaction.
The transaction limit is as follows:

- Net Banking authentication: Rs.10,00,000
- eNACH Aadhaar authentication: Rs.1,00,000
10.00.
productinfo
mandatory
String It should be a string containing a brief description of the product.Character Limit-100iPhone
firstname
mandatory
String The first name of the customer.Character Limit-60Ashish
email
mandatory
String The email of the customer.Character Limit-50[email protected]
phone
mandatory
String The phone number of the customer.9876543210
lastname
mandatory
String The last name of the customer.Character Limit-60Verma
address1
optional
String The first line of the billing address.Character Limit-100H.No- 17, Block C, Kalyan Bldg, Khardilkar Road, Mumbai
address2
optional
String The second line of the billing address.Character Limit-10034 Saikripa-Estate, Tilak Nagar
city
optional
String The city where your customer resides as part of the billing address.Mumbai
state
optional
String The state where your customer resides as part of the billing address,Maharashtra
country
optional
String The country where your customer resides.Character Limit-50India
zipcode
optional
String Billing address zip code is mandatory for the cardless EMI option.Character Limit-20400004
si
mandatory
This parameter signifies a successful consent taken from the user by the merchant. This parameter must contain 1 for a successful consent. Without this parameter sent as 1, subscription cannot be set up.
Notes: You can modify or cancel existing recurring payment registration as described in the following sections:
. Manage Recurring Payment for Cards
. Manage UPI Recurring Transaction
1
si_details
mandatory
This parameter represents mandatory details which need to be passed to during registration transaction from merchant system to PayU.

Note: It is mandatory as per the latest RBI guidelines to pass this information to the payment processor so that same can be forwarded to acquirers and issuers ( for more details refer – https://www.rbi.org.in/Scripts/NotificationUser.aspx?Id=11668&Mode=0 )

This is a JSON object and it includes a set of fields. For more information, refer to SI Parameter JSON Details
beneficiarydetail
mandatory for Net Banking
varchar This object represents bank account details of the customer which involves account number, name on the account and account type and needs to be passed if the recurring transaction needs to be set up against Net Banking. It includes the fields as mentioned in the beneficiarydetail fields description table.{β€œbeneficiaryName”: β€œSachin Tendulkar”,”beneficiaryAccountNumber”: β€œ1211450021”,”beneficiaryAccountType”: β€œSAVINGS”, β€œbeneficiaryIfscCodeβ€œ:”ICIC0000046”, β€œverificationMode”:”DEBIT_CARD”}
hash
mandatory
String It is used to avoid the possibility of transaction tampering. For more information on hash generation process, refer to Generate Hasheabec285da28fd
0e3054d41a4d24fe
9f7599c9d0b6664
6f7a9984303fd612
4044b6206daf831
e9a8bda28a6200d
318293a13d6c193
109b60bd4b4f8b09
c90972
pg
mandatory
String The pg parameter must include ENACH for Net Banking.ENACH
bankcode
mandatory
`String. The merchant must post this parameter with the corresponding payment option’s bank code value in it.
 For more information, refer to Bank Codes - Recurring Payments.ICICENCC
udf1 - udf5
optional
String User-defined fields (udf) are used to store any information corresponding to a particular transaction. You can use up to five udfs in the post designated as udf1, udf2, udf3, udf4, udf5.
Character Limit-255
Payment Preference, Shipping Method, Shipping Address1, Shipping City, Shipping Zip Code, etc.
free_trial
optional
This is mandatory only if the merchant wants to support free trial use case with card and net banking together that too on PayU Hosted Checkout integration.

In this case, PayU adjusts the transaction amount as INR 2.00 for cards. INR 0.00 for Net Banking and UPI registration irrespective of what amount is passed against the amount field in the request.
This parameter has no significance in the case of seamless flow.

beneficiarydetail fields description

FieldDescription
BeneficiaryNameRegistered name against customer’s account
BeneficiaryAccountNumberAccount number against which recurring transactions need to be executed.
BeneficiaryAccountTypeSAVINGS or CURRENT
beneficiaryIfscCode11-digit IFSC code of the customer bank
verificationModeThe verification mode can be any of the following:

- DEBIT_CARD – authentication will be done through a debit card. If no value is provided, then it will trigger Net Banking login password flow.
- AADHAAR – authentication will be done through a Aadhaar card. If no value , then it will trigger net banking login password flow. If no value is provided, then it will trigger Net Banking login password flow.

Sample request

If the merchant sends any other special characters, then they will be automatically removed. The address parameter will consider only the first 100 characters.

When the transaction POST REQUEST hits the PayU server, a new transaction entry is created in the PayU Database. A unique identifier is created in the PayU database to identify each new transaction. This identifier is known as the PayU ID (or mihpayid).

The Net Banking recurring payment registration is also known as e-Mandate. The request for Net Banking involves the following extra parameters posted compared to Cards or UPI:

  • billingCycle
  • billingInterval
  • paymentStartDate
  • paymentEndDate
  • billingAmount
  • beneficiaryName
  • beneficiaryAccountNumber
  • beneficiaryAccountType
  • ifscCode
  • verificationMode (optional)

Sample request with Debit Card as Verification mode

The sample code block for Net Banking Seamless integration (Merchant-Hosted Checkout) with the verificationMode field of the beneficiaryDetail JSON parameter with the values as DEBIT_CARD is similar to the following:

curl -X \
 POST "https://test.payu.in/_payment
-H \
 "accept: application/json" -H \
 "Content-Type: application/x-www-form-urlencoded" -d
"key=JP***g&txnid=oRWSUMU4XSQBZn&amount=0.0&firstname=Ashish&[email protected]&phone=9876543210&productinfo=iPhone&si=1&pg=ENACH&bankcode=ICICENCC&surl=https://apiplayground-response.herokuapp.com/&furl=&api_version=7&beneficiarydetail={β€œbeneficiaryName”: β€œAshish Kumar”,”beneficiaryAccountNumber”: β€œ1211450021”,”beneficiaryAccountType”: β€œSAVINGS”, β€œbeneficiaryIfscCodeβ€œ:”ICIC0000046”, β€œverificationMode”:”DEBIT_CARD”} Kumar&hash=dbe874c46dcd68ae8c6dd14d04e213f4dff1f2f89106653f61df3e8cee900df33d976e737a82291dfbea3d54d3c67c403d7371c387a1e9652e27ec682d3dce21"

Sample request with Aadhaar as Verification mode

The sample code block for Net Banking Seamless integration (Merchant-Hosted Checkout) with the verificationMode field of the beneficiaryDetail JSON parameter with the values as Aadhaar is similar to the following:

curl -X \ 
POST "https://test.payu.in/_payment 
 -H \
"accept: application/json" -H \
"Content-Type: application/x-www-form-urlencoded" -d
"key=JP***g&txnid=oRWSUMU4XSQBZn&amount=0.0&firstname=Ashish&[email protected]&phone=9876543210&productinfo=iPhone&si=1&pg=ENACH&bankcode=ICICENCC&surl=
https://apiplayground-response.herokuapp.com/&furl=&api_version=7&beneficiarydetail={β€œbeneficiaryName”:
β€œAshish Kumar”,”beneficiaryAccountNumber”: β€œ1211450021”,”beneficiaryAccountType”: β€œSAVINGS”, β€œbeneficiaryIfscCodeβ€œ:”ICIC0000046”, β€œverificationMode”:”AADHAAR”} Kumar&hash=dbe874c46dcd68ae8c6dd14d04e213f4dff1f2f89106653f61df3e8cee900df33d976e737a82291dfbea3d54d3c67c403d7371c387a1e9652e27ec682d3dce21"

Sample response

For Net Banking, you must ensure that the payment response from PayU has the expected values as described in the following table so that Net Banking registration is successful or initiated successfully with the customer’s bank.

Response ParameterExpected ValueDescription
statussuccessThis indicates that the transaction is successful
payment_sourcesistIndicates that bank details have been marked correctly for Standing Instruction
mihpayid<mihpayid number> sent. by PayUIndicates PayU’s transaction acknowledgment for a Consent transaction

The response URL returned from PayU is in the form URL format (application/x-www-form-urlencoded).

Parsed response

Array
(
    [mihpayid] => 403993715525331373
    [mode] => ENACH
    [status] => success
    [unmappedstatus] => captured
    [key] => JPM7Fg
    [txnid] => oRWSUMU4XSQBZn
    [amount] => 0.00
    [discount] => 0.00
    [net_amount_debit] => 0
    [addedon] => 2022-02-03 19:06:55
    [productinfo] => iPhone
    [firstname] => Ashish
    [lastname] => 
    [address1] => 
    [address2] => 
    [city] => 
    [state] => 
    [country] => 
    [zipcode] => 
    [email] => [email protected]
    [phone] => 9876543210
    [udf1] => 
    [udf2] => 
    [udf3] => 
    [udf4] => 
    [udf5] => 
    [udf6] => 
    [udf7] => 
    [udf8] => 
    [udf9] => 
    [udf10] => 
    [hash] => f3f8e4088231b190930fc4b87d3f39397d1a1d02622ef4683a983244e1cd5158f39adbb67c3d87dcb4da25ae4a941ebbf55918e4575fa1c39677a774d02c0d2d
    [field1] => ENACH285259747472911093
    [field2] => 337026657857179355
    [field3] => 
    [field4] => 
    [field5] => 
    [field6] => 
    [field7] => 
    [field8] => 
    [field9] => Mandate successfully scheduled at bank end: Your payment is scheduled successfully
    [payment_source] => sist
    [PG_TYPE] => ENACH-PG
    [bank_ref_num] => 450699821592111537
    [bankcode] => ICICENCC
    [error] => E000
    [error_Message] => No Error
)

Webhook for Getting Transaction Details

You can expose a webhook by requesting the PayU Integration team to configure the same against the ws_online_response parameter. If this webhook is configured, you will receive the above response object over HTTP form post method similar to the following:

unmappedstatus=success&phone=9999999999&txnid=FCDA1R100870163781&hash=84e335094bbcb2ddaa0f9a488eb338e143b273765d89c9dfa502402562d0b6f3c7935e28194ca92f380be7c84c3695415b106dcf52cb016a15fcf6adc98d724&status=success&curl=https://www.abc.in/payment/handlepayuresposne&firstname=NA&card_no=519619XXXXXX5049&furl=https://www.abc.in/payment/handlepayuresposne&productinfo=2&mode=DC&amount=800.00&field4=6807112311042810&field3=6807112311042810&field2=838264&field9=SUCCESS&email=NA&mihpayid=175477248&surl=https://www.ABC.in/payment/handlepayuresposne&card_hash=9e88cb0573d4a826b61d808c0a870ed4a990682459b0ec9e95ea421e8e47be8c&field1=42812&payment_source=sist

If the mandate is not confirmed by the customer or the mandate is confirmed by the customer, but the mandate registration is rejected from the banks, the status is communicated as a β€œfailure” over webhook. For more information, refer to Webhooks.