What is paypal ipn and how to use it?

Does anyone know what is PayPal ipn and How to use it?

https://www.paypal.com/ipn

It’s pretty straightforward; you send customers over to PayPal to take a payment, and PayPal then notify your site via the IPN system, so that you can mark the order as paid automatically (and add any additional logic that you require after payment)

What actually IPN System is?

Read the link

It’s just a HTTP request that PayPal does on your web server (usually server-side script) so you can process the payment within your website system. Your server side script usually sends same data back to PayPal so their server can check if request was genuine, and if so, it will mark the payment as completed (if it is completed after all) and do whatever it needs to do to complete the order on your website.

It goes like this:

  1. Users click “pay with PayPal” on your website
  2. User is redirected to PP site to log in and pay
  3. When paid, user is redirected back to your website
  4. PayPal’s server initiates separate HTTP request to notify your website about the payment (IPN)
  5. Your script (that was called by PP) sends same data it received back to PayPal to confirm if request from #4 was genuine
  6. If so, your script does what it needs to complete the purchase process (assign product to user’s account or just send you an email about the payment)

Thanks Avram for your nice Explanation…