Net Banking Integration
Integrate TPV through Net Banking using the procedure described in this section.
Prerequisites
Seamless integration has to be done as per the standard kit. For more information, refer to Collect Payments API under API Reference.
Step 1: List the account numbers
Collect or prepare a list of account numbers that must be posted to PayU for TPV at step 2.
Step 2: Post the parameters to PayU
With the following additional parameters, make the transaction request with the customer’s bank account number to the PayU using the Collect Payment (_payment) API. For more information, refer toCollect Payment API - Merchant Hosted Checkout .
Environment
Test Environment | https://test.payu.in/_payment> |
Production Environment | https://secure.payu.in/_payment> |
Request parameters
Parameter | Description | ypl938459435 |
---|---|---|
key mandatory
|
String The merchant key provided by PayU while onboarding.
|
|
txnid mandatory
|
String The transaction ID is a reference number fora specific order that is generated by the merchant. |
|
amount mandatory
|
String The payment amount for the transaction.
|
10.00 |
productinfo mandatory
|
String A brief description of the product.
|
iPhone |
firstname mandatory
|
String The first name of the customer.
|
Ashish |
email mandatory
|
String The email address of the customer.
|
[[email protected]](mailto:[email protected]) |
phone mandatory
|
String The phone number of the customer.
|
|
mandatory
|
String It defines the payment category for whichyou wish to perform TPV. For Net Banking, pg= 'NB'. |
NB |
mandatory
|
String It defines the bank with which you wishto perform TPV using the bank code. For more information on the list of bank codes, refer to [Bank Codes for TPV](doc:bank-codes-for-tpv) |
AXNBTPV, SBINBTPV, ICINBTPV |
beneficiarydetail mandatory
|
This is a JSON format text and there should be key named **beneficiaryAccountNumber** with the list of account numbers and the ifscCode key with the list of corresponding IFSC codes (in the same order as provided in the beneficiaryAccountNumber key). You can post up to five account details in this parameter. |
Refer to beneficiarydetail JSON Object Fields |
api_version optional
|
The api_version "6" must be passed for this parameter. | |
furl mandatory
|
String The success URL, which is the pagePayU will redirect to if the transaction is successful. |
|
surl mandatory
|
String The Failure URL, which is the page PayUwill redirect to if the transaction is failed. |
|
hash mandatory
|
String It is the hash calculated by the merchant.The hash calculation logic is: sha512(key|txnid|amount|productinfo|firstname|
|
|
address1 optional
|
String The first line of the billing address.
* *For Fraud Detection*: This information is helpful when it comes to issues related to fraud detection and chargebacks. Hence, it is must to provide the correct information.
|
|
address2 optional
|
String The second line of the billing address.
|
|
city optional
|
String The city where your customer resides as part of the billing address.
|
|
state optional
|
String The state where your customer resides as part of the billing address.
|
|
country optional
|
String The country where your customer resides.
|
|
zipcode optional
|
String Billing address zip code is mandatory for the cardless EMI option.Character Limit -20
|
|
udf1 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.
|
|
udf2 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.
|
|
udf3 optional
|
String User-defined fields (udf) are used to store any information corresponding to a particular transaction.
|
|
udf4 optional
|
String User-defined fields (udf) are used to store any information corresponding to a particular transaction.
|
|
udf5 optional
|
String User-defined fields (udf) are used to store any information corresponding to a particular transaction.
|
beneficiarydetail JSON Object Fields
It must contain the list of account numbers and the ifscCode key with the list of corresponding IFSC codes (in the same order as provided in the beneficiaryAccountNumber key). You can post up to five account details in this parameter. For example:
{"beneficiaryAccountNumber":"002001600674|00000031957292212|00000035955239352|00000035955239352",
"ifscCode":"KTKB0000046|KTKB0000023|KTKB0000035|KTKB0000035"}
Checksum Logic for Hash
The following hash logic must be used for the parameters posted:
beneficiarydetail parameter in hashing:The beneficiarydetail parameter value will be at last or the last value to be appended.
key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3 |udf4|udf5||||||beneficiarydetail|SALT
Step 3: Check the response from PayU
Hash Validation Logic for Payment Response (Reverse Hashing)
While sending the response, PayU takes the exact same parameters that were sent in the request (in reverse order) to calculate the hash and returns it to you. You must verify the hash and then mark a transaction as a success or failure. This is to make sure the transaction has not tampered within the response.
The order of the parameters is similar to the following:
sha512(SALT|status||||||||udf3|udf2|udf1|email|firstname|productinfo|amount|txnid|key)
beneficiarydetail parameter not required in reverse hashing:The beneficiarydetail parameter should not be present in reverse hashing and order of parameters is similar to the following:
sha512(SALT|status||||||||udf3|udf2|udf1|email|firstname|productinfo|amount|txnid|key)
Response Parameters
The following table describes the parameters in the response from PayU:
Param Name | Description |
---|---|
mihpayid | It is a unique reference number created for each transaction at PayU’s end. You must note this transaction ID as this will be used as a reference for all the future actions on this transaction like Inquiry or Refund. |
merchantid | It is the unique ID of the merchant. |
txnid | This parameter would contain the transaction ID value posted by the merchant during the transaction request. |
transaction_fee | The transaction fee for the TPV transaction. For Net Banking, INR 10 is charged by default. |
discount | The discount amount given by bank on the transaction fee (if any). |
amount | The net amount after discount (if any) is displayed in this parameter. For Net Banking, INR 10 is charged by default. |
paymentgatewayid | The payment gateway identifier for the bank sending the response. |
pg | The payment gateway used for the transaction. In case of Net Banking, it is “NB.” |
status | This parameter gives the status of the transaction as either success, failed or pending. Possible values: success, failure, pending If the value of the ‘status’ parameter is ’success’, the transaction is successful. If the value of ‘status’ is ‘failure’ or ‘pending’, must be treated as a failed transaction only |
PG_Type | The bankcode (as in Merchant Hosted Checkout integration) of the bank is returned in the parameter. |
key | This parameter contains the merchant key for the merchant’s account at PayU. It would be the same as the key used while the transaction request is being posted from the merchant’s end to PayU. |
riskactionStr | This parameter contains risk action (if any) taken on the account holder. |
addedon | The transaction timestamp is returned in this parameter. |
Store the mihpayid and txnid parameter values in response:PayU recommends you to make provisions to store the mihpayid and txnid parameter values (in the response) in your server as proof that TPV has been completed for a customer.
Sample response
Formatted response:
Array
(
[mihpayid] => 403993715524308236
[mode] => NB
[status] => success
[unmappedstatus] => captured
[key] => JP***g
[txnid] => TtEmKjWF2uGliF
[amount] => 10.00
[discount] => 0.00
[net_amount_debit] => 10
[addedon] => 2021-10-05 12:44:06
[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] => 74d1039311528b4a7b699db7ce195d6a219d7442271dedb23e516e29490ec743a89c12448698178907e03d32fa05e8178694db8037bc0be53380099e47c3d63f
[field1] =>
[field2] =>
[field3] =>
[field4] =>
[field5] =>
[field6] =>
[field7] =>
[field8] =>
[field9] => Transaction Completed Successfully
[payment_source] => payu
[PG_TYPE] => NB-PG
[bank_ref_num] => 30646df4-69b7-43f4-acdd-21e6a593c037
[bankcode] => TESTPGNB
[error] => E000
[error_Message] => No Error
)
Verify payment:PayU recommends you. to verify the transaction details using the Verification Payment API. For more information, For API reference, refer to Verify Payment API.
Updated 5 days ago