Legacy Flow for Server-to-Server
The integration allows merchants to redirect to the bank page directly from their checkout page and let customers complete the transaction.
Steps to Integrate
- Step 1: Initiate payment request with PayU
- Step 2: Redirect the Customer
- Step 3: Check the response from PayU
Step 1: Initiate Payment Request with PayU
The first request from you to PayU with the required transaction mandatory/ optional parameters. This needs to be a server-to-server cURL call request.
Request Parameters
Some of the parameters are mandatory for S2S integration, and a few are optional. In addition to the parameters listed in the Collect Payment API - Server-to-Server you need to include the following parameter:
Parameter | Description | Example |
---|---|---|
txn_s2s_flow | This parameter must be passed with the value as 1 for legacy S2S flow | 1 |
Collect the response in the Collect Payment API - Server-to-Server under API Reference. The response for the S2S payment request is not similar to Merchant Hosted or PayU Hosted Checkout. For description of response parameters, refer to Additional Info for Payment APIs.
Step 2: Redirect the Customer
Redirect the customer to the bank page using the post_data field of result parameter the as received in Step 1.
Step 3: Check Response from PayU
This will be a call back on the URL provided by you.
Response Parameters
The parameters in the response for similar for all the S2S flows. For more information, refer to the Additional Info for Payment APIs
The final response is similar to the following:
{
"mihpayid" : "16331433547"
"mode" : "DC"
"status" : "success"
"unmappedstatus" : "captured"
"key" : "smsplus"
"txnid" : "payuTestTransaction5700849"
"amount" : "1.00"
"cardCategory" : "domestic"
"discount" : "0.00"
"net_amount_debit" : "1.00"
"addedon" : "2022-12-03 15:03:08"
"productinfo" : "Product Info"
"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" : "6586bb33ed936d07f866cfeb42b9af99e9408270bd31c722ab3a11e61f6b6581cee3cd4f1b8b4aec3a6695c764e5cd76597832735e1e924f2ac0defbd6b3b68f"
"field1" : ""
"field2" : ""
"field3" : ""
"field4" : ""
"field5" : ""
"field6" : ""
"field7" : "AUTHPOSITIVE"
"field8" : ""
"field9" : "Success Transaction"
"payment_source" : "payuS2S"
"PG_TYPE" : "DC-PG"
"bank_ref_num" :
"bankcode" : "VISA"
"error" : "E000"
"error_Message" : "success"
"cardnum" : XXXXXXXXXXXX8811
"cardhash" : "This field is no longer supported in postback params."
"issuing_bank" : "UBI"
"card_type" : "VISA"
}
Decoupled Flow over Redirect Experience
Step 1: Initiate Payment Request with PayU
The merchant initiates PayU with the required transaction mandatory or optional parameters. This needs to be a server-to-server curl call request. URL, parameters, and descriptions are listed in the following tables.
Endpoint
Test | https://test.payu.in/_payment |
Production | https://secure.payu.in/_payment |
Request Parameters
Some of the parameters are mandatory for S2S integration, and a few are optional. In addition to the parameters listed in the Collect Payment API - Server-to-Server you need to include the following parameters:
Parameter | Description | Example |
---|---|---|
txn_s2s_flow mandatory | String This parameter must be passed with the value as 1 for Legacy Decoupled flow. | 1 |
auth_only mandatory | String This parameter must be passed with the value as 1 for this parameter. | 1 |
Step 2: Redirect the Customer
Basis a successful response of the authentication API, you need to redirect the user to the bank page using acsTemplate. This API specifies the response that is posted to termurl
after the authentication for the transaction has been processed.
Notes:
- All callbacks POST form data on the merchant’s
termurl
that is passed in Initiate Transaction API.- Validation of the response happens on the basis of the hash value being returned in the hash value of the response.
Request Parameters
Parameter | Description |
---|---|
rawBankData mandatory | String This parameter contains the raw response that is received from bank after authentication. The response is urlencoded and in query string format. |
referenceId mandatory | String This parameter contains the reference id being returned for the transaction |
bankData mandatory | JSON This parameter contains the JSON string that is to be used for authorization call.This parameter is received in case of successful OTP submission of decoupled transactions.
The postToBank contains messageDigest and pares that is to be posted back for authorization. For more information on the fields in this JSON, refer to bankData JSON Fields Description. |
authenticationStatus mandatory | String This parameter contains the authentication status of the transaction |
hash mandatory | String This parameter contains the calculated hash of the data that is posted to the merchant. For security purpose it is recommended to validate the hash value before consuming the response |
bankData JSON Fields Description
Field | Description | Applicable for EMV 3DS |
---|---|---|
cres | String This field contains the Base64 encoded value received from ACS as part of the authentication response. | Yes |
referenceId mandatory | String This field is returned in case of decoupled flow. This field contains the reference id for the transaction | |
messageDigest mandatory | String This field is returned in case of decoupled flow. This field contains the MD value being returned by the bank. | |
pares mandatory | String This field is returned in case of decoupled flow. This field contains the pares being returned by the bank | |
additionalInfo mandatory | String This field is returned in case of decoupled flow. This field contains the data that is being used for the gateways that do not return pares. | |
authorizationUrl mandatory | String This integration document assumes that you have opt-ed out for the particular configuration. The authorization URL in legacy integrations are present basis the config at PayU. Please reach out to [email protected] to know more about. |
Sample Response
{
"rawBankData" : ""
"referenceId" : "d78a00cef2b413e9969d122c7d8899f5"
"bankData" : "eyJyZWZlcmVuY2VJZCI6ImQ3OGEwMGNlZjJiNDEzZTk5NjlkMTIyYzdkODg5OWY1IiwibWVzc2FnZURpZ2VzdCI6ImMyZTllNDU2MDM3ZjAzM2U1Y2MzZDdiNmU1NTYxODlhNzgwNThjNjFjZjZiNWVkNzM4MWU4ZTM3MWQyZjQ5NGUxNjEwMjU1YzczNjk1MjA5NGM1NmU2MTFjOGUyNTEwOHwwNjQyMmY4MDQwZGVlOTkzNmNlNTJiNGM1Y2ZiNzgyNjY3MzMxY2RmIiwicGFyZXMiOiJlTnJWbWRtU284aTJwbCtsck02bHJEWXpnbTFSWWNZOGlIa1UzREhQUW9BWW43NkppTXlzM0xtcno5QVhiZDB5azhubDRNc1g3cjdXXC96bis1cFJqbHJGMmxzeGo5djZtWnRNVUZkbHZWZnJuN3dtR2dsR0VaSDljd1NUN0EwVkk2QThDdXlaXC9nRENFNVJHR3BCQUJcL1wvNytabEJXTm4wMitDeWROVXMyVGxYXC9lSWYrQWY0RGZnTytcL3oyTmowa1pQVjd2YjFFeTBKTDJqaElJZWNYZWdHOVwvMzdwc2xOaDNHSUpKbEFBeEFrUVFFTVRmZ0tcL3FOK0N2OXNiOFVacE9oN2NxZmRjZDdxV3pMaExzNEtyV0hCUjJIS1RDNXFhejBwOXZ3TWNkYjJuMHl0NWhFRDV0Z1wvQnZ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seWR4NnRIUUJvVDh3ajJQd2hsMkJ5cnh0aVkxeENuY2d6VnpieUhMTE8yMzdtSGlXd1k4YmtSeUpPMU1scVpzTFpoU2trVkRtZ1I3dThHUHJqak9DTFROU3p1ZXV5STdPNjNxcXRWeUYrdVc2aWR5bFwvNnJkT1JiZVYzXC9WcmFCdjg1RWdCXC9uSkgrZG9Id2VBbitlVUg4Y1hQNThjdjJcL0FLSDRMUnM9IiwiYWRkaXRpb25hbEluZm8iOnsiYXV0aFVkZjEiOiIiLCJhdXRoVWRmMiI6IiIsImF1dGhVZGYzIjoiIiwiYXV0aFVkZjQiOiIiLCJhdXRoVWRmNSI6IiIsImF1dGhVZGY2IjoiIiwiYXV0aFVkZjciOiIiLCJhdXRoVWRmOCI6IiIsImF1dGhVZGY5IjoiIiwiYXV0aFVkZjEwIjoiIn0sImF1dGhvcml6YXRpb25VcmwiOiJodHRwczpcL1wvc2VjdXJlLnBheXUuaW5cLzQzYjM5YTYwMzkwOGFmNzMyNWMyNGM3OWYzMWY1Zjg0XC9kZWNvdXBsZWRcL0F1dGhvcml6ZVR4biJ9"
"authenticationStatus" : "success"
"hash" : "2d87a411991566566a2efacc926e1bb60f7b850f7812c49343af4fa43ed5939252a17d11cd7a0a78ff9605cb5fdc3407de0ae9a5c54bf9240f6df9334cdecc64"
}
Decoded bankData example
{
"referenceId": "d78a00cef2b413e9969d122c7d8899f5",
"messageDigest": "c2e9e456037f033e5cc3d7b6e556189a78058c61cf6b5ed7381e8e371d2f494e1610255c736952094c56e611c8e25108|06422f8040dee9936ce52b4c5cfb782667331cdf",
"pares": "eNrVmdmSo8i2pl+lrM6lrDYzgm1RYcY8iHkU3DHPQoAYn76JiMys3Lmrz9AXbd0yk8nl4MsX7r7W/zn+5pRjlrF2lsxj9v6mZtMUFdlvVfrn7wmGglGEZH9cwST7A0VI6A8CuyZ/gDCE5RGGpBAB//7+ZlBWNn02+CydNUs2TlX/eIf+Af4DfgO+/z2Nj0kZPV7vb1Ey0JL2jh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UH8cXP58cv2/AKH4LRs=",
"additionalInfo": {
"authUdf1": "",
"authUdf2": "",
"authUdf3": "",
"authUdf4": "",
"authUdf5": "",
"authUdf6": "",
"authUdf7": "",
"authUdf8": "",
"authUdf9": "",
"authUdf10": ""
},
"authorizationUrl": "https://secure.payu.in/43b39a603908af7325c24c79f31f5f84/decoupled/AuthorizeTxn"
}
Step 3: Authorize (Charge) the Payment
The authorization request is the final step of transaction processing. This again needs to be an S2S call from the merchant’s server to PayU server.
Request Parameters
Post URL: Use the authorizationUrl received in Step 2 to post the following request parameters.
In the request parameters, you will be appending the JSON values received in Step 2 on termUrl
to the request, so the list of the request parameters will be as in the following request parameters table:
Field | Description | Applicable to EMV 3DS |
---|---|---|
cres | This field contains the Base 64 encoded value received from ACS as part of the authentication response | Yes |
referenceId | This field contains the same referenceId which sent in response of the first call | |
additionalInfo | This field can be used in the case of schemes where different parameters may need from merchant side. | |
messageDigest | This field includes the Base 64 encoding of (sha56 hash of the JSON data (post to server). | |
pares | This parameter contains the pares being returned by the bank. |
Sample Request
curl -X POST "{{termurl from Step 2}}"
-H "Content-Type: application/x-www-form-urlencoded" -d "key= {{merchKey}}&amount= {{amount}},&hash&{{auth_hash}}&txnid= {{txnId}}&referenceId= b6035f64240b1862295bc571952cf98&pares=””,&cres=”” &messageDigest=“”&additionalInfo={ "authUdf1": "", "authUdf2": "", "authUdf3": "", "authUdf4": "", "authUdf5": "", "authUdf6": "", "authUdf7": "", "authUdf8": "", "authUdf9": "", "authUdf10": "" }"
Response Parameters
The parameters in the response for similar for all the S2S flows. For more information, refer to the Additional Info for Payment APIs.
Sample Response
{
"metaData": {
"message": "No Error",
"referenceId": "b6035f64240b1862295bc571952cf984",
"statusCode": "E000",
"txnId": "payuTestTransaction2746829",
"unmappedStatus": "success",
"submitOtp": {
"status": "success"
}
},
"result": {
"mihpayid": "15270336226",
"mode": "CC",
"status": "success",
"key": "4wvMqy",
"txnid": "payuTestTransaction2746829",
"amount": "1.10",
"addedon": "2022-06-01 17:39:29",
"productinfo": "Product Info",
"firstname": "Postman",
"lastname": "",
"address1": "",
"address2": "",
"city": "",
"state": "",
"country": "",
"zipcode": "",
"email": "[email protected]",
"phone": "9988776655",
"udf1": "",
"udf2": "",
"udf3": "",
"udf4": "",
"udf5": "",
"udf6": "",
"udf7": "",
"udf8": "",
"udf9": "",
"udf10": "",
"card_token": "",
"card_no": "XXXXXXXXXXXX8006",
"field0": "",
"field1": "6540854745166970506094",
"field2": "947167",
"field3": "1.10",
"field4": "15270336226",
"field5": "100",
"field6": "",
"field7": "AUTHPOSITIVE",
"field8": "",
"field9": "Transaction is Successful",
"payment_source": "payuPureS2SAuth",
"PG_TYPE": "CC-PG",
"error": "E000",
"error_Message": "No Error",
"cardToken": "",
"net_amount_debit": "1.1",
"discount": "0.00",
"offer_key": "",
"offer_availed": "",
"unmappedstatus": "captured",
"hash": "cdc409dfd15a842b8d15d6627d0027619882ed800773fa413cef491ae8ff2ef0cdfa654680ba4c8f3567313c6a6b00b94cb3bb5e16bad21d26be01216a69af41",
"bank_ref_no": "6540854745166970506094",
"bank_ref_num": "6540854745166970506094",
"bankcode": "CC",
"surl": "",
"curl": "",
"furl": "",
"card_hash": "fdb59253e36daf8b3969525ae3799ccb4bb41993a5d2fcaf22737ec3ac8b90ab"
}
}
Updated 12 months ago