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, 6:58 AM EST
How to use drop_category in pay u integration
Asht TPosted Nov 29, 2023, 12:57 AM EST
@anu Mepani: please tell me how to pass drop_Category in this code
Asht TPosted Apr 15, 2023, 7:24 AM EDT
How to implement pay u integration in mvc using ajax call
Asht TPosted Oct 13, 2021, 1:18 AM EDT
What is Enable verify API and Web hook call
Asht TPosted Oct 22, 2020, 10:21 PM EDT
Suppose Transaction is processing (Pending) after some time(after another day) this transaction is successful then how to get payment response
Saber ShaikhPosted Dec 8, 2019, 11:06 PM EST
Thank you nice work bro
boddu pratushaPosted Mar 21, 2018, 3:23 AM EDT
Showing error as checksum failure.. What could be the problem.. ? Plz help out..
boddu pratushaPosted Mar 19, 2018, 10:11 PM EDT
What should be written in submit button in order to get PayUmoney page..? help me...Plz
johannes TshabalalaPosted Mar 8, 2018, 3:13 AM EST
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, 6:35 AM EST
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, 12:31 AM EDT
Can you please post sample of Integrate PayTm in ASP.Net
Sagar JadhavPosted May 7, 2017, 7:02 AM EDT
This demo sln not working...error shows????
PoonamPosted Mar 24, 2017, 9:15 AM EDT
After successful payment session gets timeout in response handler page..what what o.
Gowtham SheriffPosted Mar 21, 2017, 3:44 AM EDT
I this, but it is showing error :(
Gowtham SheriffPosted Mar 21, 2017, 3:44 AM EDT
Error Reason:You seem to be using an incorrect key or salt value.
Ajay VeerPosted Dec 8, 2016, 9:14 PM EST
How can i am integrate the kit in my code i dont know the procedure
Abhilab DasPosted Dec 7, 2016, 11:26 PM EST
When we go live, how are transactions mapped to our merchant account ? Is it done by "Key","Salt" ?
Aditya KumarPosted Nov 10, 2016, 9:00 PM EST
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, 10:14 AM EDT
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 11, 2016, 10:26 PM EDT
Are you sure you have use form with POST method?
Kailash BhakuniPosted Apr 10, 2016, 10:27 PM EDT
When I submitted form , its showing transaction failed with following reason "No form post variables found"
Gaurav GholamPosted Feb 17, 2016, 12:46 AM EST
Thanks its nice one
Ano MepaniPosted Feb 13, 2016, 8:27 PM EST
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 12, 2016, 8:12 PM EST
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, 7:23 AM EST
nice one..
Jai ClientPosted Oct 1, 2015, 7:58 AM EDT
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, 12:33 AM EDT
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, 12:51 AM EDT
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, 1:48 PM EDT
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, 7:59 PM EDT
can u pls share asp.net mvc resources to my mail pls ... [email protected] thanks sir
Manav PandyaPosted Sep 7, 2015, 7:58 PM EDT
this api is possible in core asp.net website ????
jagadeeshwar siduralaPosted Aug 24, 2015, 11:24 PM EDT
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, 11:23 AM EDT
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 18, 2015, 11:20 PM EDT
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, 3:47 AM EDT
Good article Bro. Thank you for sharing
Ano MepaniPosted Jul 24, 2015, 10:26 PM EDT
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, 6:24 AM EDT
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, 12:06 PM EDT
m raju thank you I have added MerchantKey "C0Dr8m" and "3sf0jURk" in Source code and updated article
m rajuPosted Jul 19, 2015, 9:59 PM EDT
with reference to above as stated in their document
m rajuPosted Jul 19, 2015, 9:58 PM EDT
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, 6:27 AM EDT
@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, 2:25 AM EDT
Please Give me A Correct Code Payumoney ...
Parth MehtaPosted Jul 10, 2015, 2:00 AM EDT
its give me an ERROR.... Sorry, Some Problem Occurred. can u guess what was the problem??
Vipul MalhotraPosted Jul 6, 2015, 3:42 AM EDT
Exactly what I needed...Thanks for sharing
Ano MepaniPosted Jun 26, 2015, 10:43 AM EDT
Thanks once again all of you
Debasis SahaTOP 100Posted Jun 24, 2015, 8:43 PM EDT
Nice subject to share...
Gopi ChandPosted Jun 24, 2015, 7:34 PM EDT
Great topic
Jitendra KumarPosted Jun 24, 2015, 5:27 AM EDT
Good Article.
Santhakumar MunuswamyPosted Jun 23, 2015, 11:01 AM EDT
Thanks for nice article:)
Ano MepaniPosted Jun 23, 2015, 10:21 AM EDT
thanks to all
Anoop Kumar SharmaPosted Jun 23, 2015, 8:26 AM EDT
Nice Article. Thanks for sharing..!!
Shailesh UkePosted Jun 23, 2015, 6:24 AM EDT
Nice Article............
Debendra DashPosted Jun 23, 2015, 3:59 AM EDT
Good one Arvind
RakeshPosted Jun 23, 2015, 3:49 AM EDT
Good one brother
Jaipal ReddyPosted Jun 23, 2015, 3:05 AM EDT
good start.
Former memberPosted Jun 23, 2015, 1:09 AM EDT
good one