PayUMoney Payment Integration with IPN in Codeigniter


Payment gateway offers the desired and vital link between the online seller (merchant), its customer, the customer’s online payment instrument provider and the bank account of the online merchant.

  • First create merchant account in PayUMoney.
  • The PayU Redirect Payment Page (RPP) allows merchants to integrate into PayU by redirecting their consumers to PayU’s hosted payment page.
  • This is accomplished by using a combination of server side API calls and HTTPS redirects.
  • The setTransaction API call is used to setup/initiate transactions between the merchant and PayU using server to server requests.
  • Now first do setTransaction API call into your controller.

  • After completion this, your page redirect to “returnURL” .
  • Internally it also fire IPN (Instant Payment Notification). The Instant Payment Notification (IPN) is an asynchronous notification mechanism where PayU sends transaction results/information to a specified URL without any dependency on a customer’s browser.
  • Notifications are sent in XML format using POST method.
  • In the case of approval the IPN will fire after the payment has been attempted and will return that result.

IPN called under following conditions:

  1. When a payment on the PayU redirect either fails or succeeds.
  2. When a user session times out on the PayU redirect with no chance for the user to finish payment.
  3. When a transaction, pending review for fraud, is either approved or rejected by case managers.

In your notification page write below code

Bravo!!! Now you can collect payment from your customers.


Hinaba Zala MEAN stack developer

I am a MEAN stack developer at Yudiz Solutions Pvt. Ltd. Want to explore javascript. Eager to know things about Node, Angular and MongoDB.

Comments are closed.