{{ searchResult.published_at | date:'d MMMM yyyy' }}

Loading ...
Loading ...

Enter a search term such as “mobile analytics” or browse our content using the filters above.

No_results

That’s not only a poor Scrabble score but we also couldn’t find any results matching “”.
Check your spelling or try broadening your search.

Logo_distressed

Sorry about this, there is a problem with our search at the moment.
Please try again later.

One of the benefits of having your own merchant account is the level of integration that it provides.

A payment gateway enables your customers to pay without leaving your website, and there is almost no limit to the ways that you can build specific functionality related to payments that makes business easier for customers and your business.

Fortunately, even if you don't have a merchant account, you can automate a number of things using PayPal's Instant Payment Notification (IPN) system.

PayPal IPN enables PayPal merchants' applications to receive automated notifications about payment status so that these applications can perform whatever functions are desired when specific payment events occur.

Want your website to perform some function once a payment has cleared? Does your application need to know when a PayPal subscription has expired? If so, PayPal IPN is a simple yet powerful solution.

Setting Up IPN

Getting started with IPN is easy thanks to the fact that PayPal provides sample code for ASP.net, Cold Fusion, Java, Perl and PHP.

The code is extremely straightforward and with minimal modification can serve as a working script.

The PayPal IPN documentation lists the various variables that are sent with IPN notifications as well as the most important variable - the payment events that it provides notification for.

For instance, if you want your script to do something when a payment has been cleared, you will look for the payment_status variable to be "Completed".

If you want to know that a subscription has expired, you will look for the txn_type variable to be "subscr_eot."

By building a script that deals with all of the possible events that are used with the type of payments that you're accepting and the type of business logic you want to have performed automatically when payment events occur, you can build scripts that significantly reduce the amount of manual work that some merchants have in managing PayPal payments.

Samples

In addition to its sample code, PayPal links to a number of tutorials showing how to implement IPN-based applications. These are worthwhile to look through.

There is also no shortage of PayPal IPN scripts that can be purchased or commercial solutions that use PayPal IPN. However, the sample code provided by PayPal is satisfactory and unless you have a significantly complex application, should suffice.

Telling PayPal to Use IPN

Once your script is set up, you need to tell PayPal where it's located so that it can send the notifications to it.

The easiest place to do this is in your PayPal order form code.

For instance, if your PayPal IPN script is called ipn.php, add the following hidden form field to your PayPal code:

<input name="notify_url" size="20" type="hidden" value="http://www.yourwebsite.com/ipn.php" />

Summary

Implementing PayPal IPN is a great way to automate many activities that PayPal merchants often handle manually and is a decent compromise for merchants not ready to move up to their own merchant accounts.

For merchants looking for a more integrated solution with a complete API similar in nature to those offered by payment gateways and which allows merchants to keep users on their websites throughout the entire order process, PayPal's Website Payments Pro offering is another intermediary solution.

Avatar-blank-50x50

Published 5 September, 2008 by Patrick Oak

82 more posts from this author

Comments (3)

Andrew Nesbitt

Andrew Nesbitt, Developer at Forward Internet Group

Active Merchant is a great plugin for Ruby on Rails for doing paypal integration too, as created and used by Shopify

http://www.activemerchant.org/

almost 8 years ago

Avatar-blank-50x50

Andy Geldman

I like PayPal IPN for its simplicity but you do get more flexibility and functionality with the "proper" API

almost 8 years ago

Avatar-blank-50x50

eBusiness

Paypal IPN has been successfully using as alternative payment method by many Internet merchants. It helps to increase sales at no extra cost & many ecommerce systems are shipped with it. Just enter relevant Paypal parameters in back office (gateway configuration) and start using it on the Web.

about 7 years ago

Comment
No-profile-pic
Save or Cancel
Daily_pulse_signup_wide

Enjoying this article?

Get more just like this, delivered to your inbox.

Keep up to date with the latest analysis, inspiration and learning from the Econsultancy blog with our free Daily Pulse newsletter. Each weekday, you ll receive a hand-picked digest of the latest and greatest articles, as well as snippets of new market data, best practice guides and trends research.