PHP Paypal IPN script example

The Paypal IPN (Instant Payment Notification) is PayPal’s notification service that send your website a notification whenever a transaction is made.

The service allows you to update our order status, send out confirmation emails, start the order fulfilment process and update stock once you have received the notification.

The script will get notified when the following occurs:

  • A payment is made
  • Pending payment notifications
  • Recurring payments and subscriptions
  • Authorisations
  • Disputes, Chargebacks and Refunds

Download our script from the following link:

Paypal PHP IPN Script Example

You can download the full Paypal IPN guide from the following link:

Paypal IPN Guide (pdf)

Things to look out for

Paypals IPN system went down for a couple of days earlier this year so ensure you have a backup process in place..

If you sell goods on Ebay and your own website please note that the IPN script will still be contacted. We like to use the Custom field to see if it is a website payment or ebay payment.

Paypals Sandbox system is a load of old tosh. Dont use it – it rarely works.

The easiest way to test the system works is by changing the price to 2p or a similar small amount and test it with someone else’s Paypal account.


Have your say...


Sam: posted on 2013-11-24 07:10:50
you might want to update this script as it's out of date now - PP use http 1.1. headers.

Leave a Reply

Your email address will not be published. Required fields are marked *