This section provides the request parameters, sample request and response for a Net Banking Recurring Payment consent transaction.
HTTP Method: POST
Environment
Test Environment | https://test.payu.in/_payment |
---|---|
Production Environment | https://secure.payu.in/_payment |
Request parameters
Parameter | Description | Value |
---|---|---|
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. | 1 |
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. | s7hhDQVWvbhBdN |
amount mandatory | String This field should contain the payment amount for the transaction. | 10.00 |
productinfo mandatory | String It should be a string containing a brief description of the product.Character Limit-100 | iPhone |
firstname mandatory | String The first name of the customer.Character Limit-60 | Ashish |
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-60 | Verma |
address1 optional | String The first line of the billing address.Character Limit-100 | H.No- 17, Block C, Kalyan Bldg, Khardilkar Road, Mumbai |
address2 optional | String The second line of the billing address.Character Limit-100 | 34 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-50 | India |
zipcode optional | String Billing address zip code is mandatory for the cardless EMI option.Character Limit-20 | 400004 |
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 following: - BeneficiaryName: Registered name against customer’s account - BeneficiaryAccountNumber: Account number against which recurring transactions need to be executed - BeneficiaryAccountType: SAVINGS or CURRENT - beneficiaryIfscCode: 11-digit IFSC code of the customer bank - verificationMode DEBIT_CARD – authentication will be done through a debit card. If no value or value other than DEBIT_CARD, then it will trigger net banking login password flow. | {“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 Hash | eabec285da28fd
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. |
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)
The sample code block for Net Banking Seamless integration (Merchant-Hosted Checkout) 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 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 Parameter | Expected Value | Description |
---|---|---|
status | success | This indicates that the transaction is successful |
payment_source | sist | Indicates that bank details have been marked correctly for Standing Instruction |
mihpayid | <mihpayid number> sent. by PayU | Indicates PayU’s transaction acknowledgment for a Consent transaction |
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
)