UPI Intent Autopay TPV Integration

Integrate TPV through UPI using the procedure described in this section.

Prerequisites

S2S (Seamless) integration has to be done as per the standard kit. For more information, refer to UPI Integrations - S2S.

πŸ“˜

Note:

Currently, PayU supports UPI Intent Autopay only with Seamless integration.

Step 1: Post the parameters to PayU

With the following parameters, make the transaction request with the customer’s bank account number to the PayU using the Collect Payment (_payment) API.

Environment

Request parameters

In the merchant-initiated POST REQUEST, Hash is a mandatory parameter. It is critical to calculate the hash correctly and post it to PayU in the request.

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.s7hhDQVWvbhBdN
amount
mandatory
String This field should contain the payment amount for the transaction.
The limit for recurring payments using UPI payment mode:

- Auto-debit is Rs.15000_ (the auto-debit limit is higher for below listed purpose)

- With PIN is Rs.1,00,00

Note: The auto-debit limit for the following UPI recurring payments is one lakh rupees (Rs.1,00,000):

- Insurance premiums

- Credit card bill payments

- Insurance premium
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
surl
mandatory
String The "surl" field is the success URL, which is the page PayU will redirect to if the transaction is successful. The merchant can handle the response at this URL after the customer is redirected there.https://apiplayground-response.herokuapp.com/
furl
mandatory
String The "furl" field is the Failure URL, which is the page PayU will redirect to if the transaction is failed. The merchant can handle the response at this URL after the customer is redirected there.https://apiplayground-response.herokuapp.com/
hash
mandatory
String It is used to avoid the possibility of transaction tampering.Β For the hash checksum logic, refer to Checksum Logic for Hash. eabec285da28fd
0e3054d41a4d24fe
9f7599c9d0b6664
6f7a9984303fd612
4044b6206daf831
e9a8bda28a6200d
318293a13d6c193
109b60bd4b4f8b09
c90972
pg
mandatory
varchar The pg parameter for UPI must be UPI.UPI
bankcode
mandatory
varchar This parameter contains INTTPV for UPI TPV Intent.INTTPV
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.
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
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

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:

πŸ“˜

si_details parameter in Hashing:

The si_details parameter value will be at last or the last value to be appended.

key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3
|udf4|udf5||||||si_details|SALT

For more information on hash generation process, refer to Generate Hash

Step 2: 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 code block:

sha512(SALT|si_details|status||||||udf3|udf2|udf1|email|firstname|productinfo|amount|txnid|key)

Response parameters

For the response parameter description, refer to Additional Info for Payment APIs.

πŸ“˜

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

  • Success scenario

On receiving valid request over PayU’s payment interface (_payment), PayU returns JSON object as response object similar to the following in INTENT :

{
   "metaData":{
      "message":null,
      "referenceId":"5ae6e6d94b4b5f9dee282b95f6020c98",
      "statusCode":null,
      "txnId":"40d553e62525a03e5c54",
      "txnStatus":"pending",
      "unmappedStatus":"pending"
   },
   "result":{
      "paymentId":"15257049438",
      "merchantName":"smsplus",
      "merchantVpa":"growfitter.payu@hdfcbank",
      "amount":"1.90",
      "intentURIData":"upi://mandate?pa=growfitter.payu@hdfcbank&pn=IBIBO GROUP PRIVATE LIMITED&mn=&tid=40d553e62525a03e5c54&validitystart=30052022&validityend=01092022
     &am=10.00&amrule=MAX&recur=MONTHLY&recurvalue=30&recurtype=&tr=15257049438&cu=INR
     &mc=5411&tn=UPI Transaction for 40d553e62525a03e5c54&mode=13&purpose=14
     &orgid=159240&rev=Y&block=N&txnType=CREATE",
      "postToBank":{
         "token":"C6ABAA6A-F0CE-432A-61C1-CFA48EDE847B",
         "amount":"1.90",
         "mihpayid":"5ae6e6d94b4b5f9dee282b95f6020c98",
         "disableIntentSeamlessFailure":"0",
         "payeeVpa":"growfitter.payu@hdfcbank",
         "payeeName":"smsplus",
         "additionalCharges":0,
         "transactionFee":"1.90"
      },
      "issuerUrl":"https://secure.payu.in\/591d096c5495eff4234e95eb64a1e1b8/intentSeamlessHa
ndler.php"
   }
}
  • Failure scenario
{
   "metaData":{
      "message":"Transaction failed due to invalid params shared by the merchant",
      "referenceId":"dde7096af9db932a9fd09b9b4383d8be",
      "statusCode":"E1101",
      "txnId":"0c4931ddee7a4f69227f"
     "txnStatus"": ""failed"","
     "unmappedStatus"": ""failure""},""result""\": {}}"
   }

πŸ“˜

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.

Webhook response

You can also expose a webhook and needs to request Integration team PayU team to configure the same against β€œws_online_response” parameter. If this webhook is configured, merchant will receive above response object over HTTP form post method similar to the following:

mihpayid=700010006211076&mode=UPI&status=success&key=275Q84&txnid=11w2f611dbab91 79f1ee89&amount=10.00&addedon=2020-08- 21+02%3A11%3A08&productinfo=Product+Info&firstname=Payu- Admin&lastname=&address1=&address2=&city=&state=&country=&zipcode=&email=test%40exa mple.com&phone=1234567890&udf1=&udf2=&udf3=&udf4=Executed+Callback&udf5=&udf6=& udf7=&udf8=&udf9=&udf10=&card_token=&card_no=&field0=https%3A%2F%2Fwww.hdfc.co.in& field1=aastha%40hdfcbank&field2=HDFAD4C6BC943154ABAE0535CB2E20A7369&field3=aastha %40hdfcbank&field4=Aaaaaasthaaaa&field5=ad5626305e96efaae0535db2e20aa960%40hdfcbank &field6=HDFC0002373%7C50100101672620&field7=MD200%7CMandate+Request+Pending&fiel d8=&field9=Recurrence+Payment+Success%7CCompleted+Using+Callback&payment_source=sist& PG_TYPE=HDFCU+SI&error=E000&error_Message=No+Error&net_amount_debit=10&unmappedsta tus=captured&hash=f8be95fee8e73b8bdc0d22ee6627cc59237d4d69046db1b86580b1107affcf8fd 471743f94101b4fdd7f2184d8eb35bbbb95c77728189d50227629e75851a498&bank_ref_no=0234 02045965&bank_ref_num=023402045965&bankcode=UPI&surl=https%3A%2F%2Fbizcheckouttes t.payu.in%2Fadmin%2Ftest_response&curl=https%3A%2F%2Fbizcheckouttest.payu.in%2Fadmin%2 Ftest_response&furl=https%3A%2F%2Fbizcheckouttest.payu.in%2Fadmin%2Ftest_response