Introduction
PayU or PayuMoney is the fastest growing Payment Gateway in India that supports all major banks and credit/debit card for payment settlement. PayUMoney provide support to enterprise user on behalf of PayUbiz Payment Gateway. As PayuBiz support more number of service then Payumoney.
Description
I have created a test demo with a PayUMoney in ASP.NET web form that explains the following procedure.
Step 1
Figure 1: Fill up all required details for process order.
Before we start we first need to configure PayUMoney or PayUbiz for our website, the following is the description of the technical details.
- Production server (POST URL): To post successfully on the production server, your merchant application status should be approved and you should use the key sent to you by PayUMoney after confirming the approval of your application.
- Test server (POST URL):
- Key-JBZaLc: (This key and salt value is provided by the PayUMoney team after our PayUMoney account is configured and approved.)
- Salt: GQs7yium
In the preceding image, Amount, Email, First Name and Phone number is required and when the actual order is placed it comes dynamically. It's a customer data.
Success URI and Failure URI handles the response for a successful/failed transaction, this URI can also be set in web.config.
In the Test Account, when you click submit it may cause errors such as your bank is not authorized. Now you just need to click Try Again and enter the details for the Visa credit details as shown below.
Step 2
Figure 2: Select Payment method and fill data
Here, for the test account of PayUMoney it requires details about the card number, CVV number and expire date depending on the PayUMoney Configuration.
- Card Name: any name
- Card Number: 5123456789012346
- CVV: 123
- Expiry: May 2017
After production some minor configuration is needed as the PayUbiz support team will guide you. The PayUbiz payment gateway can accept most Indian bank cards and payments.
Step 3
Figure 3: After filling detail processing payment
To process a payment in test mode, just verify the user form data and actually not redirect to the bank payment and the process payment and after successful payment in test mode you will shortly get an email or SMS that you have entered when making an order.
Step 4
Figure 4: Returning after payment
Returning after payment processing.
Step 5
Figure 5: This page displays transaction completed successfully and also user receives a SMS or Email from PayUMoney or PayUbiz about this transaction instantly.
History
I have updated this article. The changes done is the name of the payment gateway and the most important is the added Demo link so you can directly test live.
Conclusion
In this tutorial we have learned the basic procedure for integrating PayUMoney into ASP.NET websites. This basic procedure is the same for all PHP, ASP.NET and other technologies. I hope you can integrate a PayUMoney payment gateway into your website using this tutorial.
Note: Technical guideline documents and source code is given below:

Asht TPosted Dec 1, 2023, 11:58 AM
How to use drop_category in pay u integration
Asht TPosted Nov 29, 2023, 5:57 AM
@anu Mepani: please tell me how to pass drop_Category in this code
Asht TPosted Apr 15, 2023, 11:24 AM
How to implement pay u integration in mvc using ajax call
Asht TPosted Oct 13, 2021, 5:18 AM
What is Enable verify API and Web hook call
Asht TPosted Oct 23, 2020, 2:21 AM
Suppose Transaction is processing (Pending) after some time(after another day) this transaction is successful then how to get payment response
Saber ShaikhPosted Dec 9, 2019, 4:06 AM
Thank you nice work bro
boddu pratushaPosted Mar 21, 2018, 7:23 AM
Showing error as checksum failure.. What could be the problem.. ? Plz help out..
boddu pratushaPosted Mar 20, 2018, 2:11 AM
What should be written in submit button in order to get PayUmoney page..? help me...Plz
johannes TshabalalaPosted Mar 8, 2018, 8:13 AM
Hi guys i am new here can some help i am working on MVC project i need to include payu config in my web.confiq file i am getting error can some one shared some light there for specific mvc projects
Syed RazaPosted Nov 5, 2017, 11:35 AM
Tell me how can I integrate a local banking system credit card swiping device to windows form c# application (Point of Sale)? Thanks for advance!
Atul SharmaPosted Jun 8, 2017, 4:31 AM
Can you please post sample of Integrate PayTm in ASP.Net
Sagar JadhavPosted May 7, 2017, 11:02 AM
This demo sln not working...error shows????
PoonamPosted Mar 24, 2017, 1:15 PM
After successful payment session gets timeout in response handler page..what what o.
Gowtham SheriffPosted Mar 21, 2017, 7:44 AM
I this, but it is showing error :(
Gowtham SheriffPosted Mar 21, 2017, 7:44 AM
Error Reason:You seem to be using an incorrect key or salt value.
Ajay VeerPosted Dec 9, 2016, 2:14 AM
How can i am integrate the kit in my code i dont know the procedure
Abhilab DasPosted Dec 8, 2016, 4:26 AM
When we go live, how are transactions mapped to our merchant account ? Is it done by "Key","Salt" ?
Aditya KumarPosted Nov 11, 2016, 2:00 AM
Hello Sir, I want to perform this for only test purpose. So can i have a dummy test account on PayUMondey ? Please help.
Nikhil SrivastavaPosted Sep 28, 2016, 2:14 PM
Hi I have integrated the gateway successfully but when the gateway post back the data to my asp.net mvc action the logged in user gets logged ut automatically . I dont know why . Please tell how to retain the user login .
Ano MepaniPosted Apr 12, 2016, 2:26 AM
Are you sure you have use form with POST method?
Kailash BhakuniPosted Apr 11, 2016, 2:27 AM
When I submitted form , its showing transaction failed with following reason "No form post variables found"
Gaurav GholamPosted Feb 17, 2016, 5:46 AM
Thanks its nice one
Ano MepaniPosted Feb 14, 2016, 1:27 AM
If you explicitly clicking on back button current transaction is failed because it understand back button click as cancel transaction.Or you can debug response status code behind in "Responsehandling.aspx"from demo code.
Yogesh SharmaPosted Feb 13, 2016, 1:12 AM
My page is redirected to payment page successfully but after virtual payment deduction its show error message "transaction failed" due to click on back button , please resolve this issue and email me [email protected]
Upendra Pratap ShahiPosted Feb 8, 2016, 12:23 PM
nice one..
Jai ClientPosted Oct 1, 2015, 11:58 AM
if we put value then working bu i want to pass parrameter on default page like[Default.aspx?OrderId=1044] but default page not show value in text box.
vivek nigamPosted Oct 1, 2015, 4:33 AM
i want that all the text boxes for the payment option will be provided by me like credit card and password..it should not be given by the payu but all process will be done by backend user can not see the process...pls help me or provide demo on this
Ano MepaniPosted Sep 26, 2015, 4:51 AM
Please change production server URL from "https://test.payu.in/_payment" to "https://secure.payu.in/_payment" and then try for same. Thanks
ranjit kuPosted Sep 25, 2015, 5:48 PM
Demo is working good but when i m changing tha approved salt and key its not working heLP me waiting for mail
Manav PandyaPosted Sep 7, 2015, 11:59 PM
can u pls share asp.net mvc resources to my mail pls ... [email protected] thanks sir
Manav PandyaPosted Sep 7, 2015, 11:58 PM
this api is possible in core asp.net website ????
jagadeeshwar siduralaPosted Aug 25, 2015, 3:24 AM
We need a sample code in asp.net for verify_Payment which one of the method in PAYU integration kit. it will be useful to know transaction status. Please help us.
Ano MepaniPosted Aug 21, 2015, 3:23 PM
you can can payment then you will get error message. Currently this credential is to understand basic integration with app. So, there is no other way to test false condition with this test credential
shalini dPosted Aug 19, 2015, 3:20 AM
is there any test data to use for testing failure. I am getting success for any random valid format credit card number i use.
Arshad AliPosted Aug 17, 2015, 7:47 AM
Good article Bro. Thank you for sharing
Ano MepaniPosted Jul 25, 2015, 2:26 AM
yes txnid is same for transaction which is auto generated while requesting payment. One more thing this example of payment gateway return form post data but to implement payment gateway with angularjs yo need different api which return json response that would be very useful.
Bhanu PrakashPosted Jul 24, 2015, 10:24 AM
Can you confirm whether txnid which we generate and send to payU and payU txnid returned in return url are same? because it is getting difficult for me to read the post back parameters which was passed from payU using javascript. You can ask why I use javascript, for that I'm using angularJS for my application and web api to fetch data.
Ano MepaniPosted Jul 20, 2015, 4:06 PM
m raju thank you I have added MerchantKey "C0Dr8m" and "3sf0jURk" in Source code and updated article
m rajuPosted Jul 20, 2015, 1:59 AM
with reference to above as stated in their document
m rajuPosted Jul 20, 2015, 1:58 AM
good article thanks. Its working with merchant key as C0Dr8m and salt as 3sf0jURk. but it doesnt work with Test Key – JBZaLcTest Salt – GQs7yium
Ano MepaniPosted Jul 10, 2015, 10:27 AM
@Parth you can debug error type or error code in responsehandling.aspx in source code. As I have implemented for older version payu and now PayuBiz have may be change some policy.
Rajesh GondaliaPosted Jul 10, 2015, 6:25 AM
Please Give me A Correct Code Payumoney ...
Parth MehtaPosted Jul 10, 2015, 6:00 AM
its give me an ERROR.... Sorry, Some Problem Occurred. can u guess what was the problem??
Vipul MalhotraPosted Jul 6, 2015, 7:42 AM
Exactly what I needed...Thanks for sharing
Ano MepaniPosted Jun 26, 2015, 2:43 PM
Thanks once again all of you
Debasis SahaPosted Jun 25, 2015, 12:43 AM
Nice subject to share...
Gopi ChandPosted Jun 24, 2015, 11:34 PM
Great topic
Jitendra KumarPosted Jun 24, 2015, 9:27 AM
Good Article.
Santhakumar MunuswamyPosted Jun 23, 2015, 3:01 PM
Thanks for nice article:)
Ano MepaniPosted Jun 23, 2015, 2:21 PM
thanks to all
Anoop Kumar SharmaPosted Jun 23, 2015, 12:26 PM
Nice Article. Thanks for sharing..!!
Shailesh UkePosted Jun 23, 2015, 10:24 AM
Nice Article............
Debendra DashPosted Jun 23, 2015, 7:59 AM
Good one Arvind
RakeshPosted Jun 23, 2015, 7:49 AM
Good one brother
Jaipal ReddyPosted Jun 23, 2015, 7:05 AM
good start.
Former memberPosted Jun 23, 2015, 5:09 AM
good one