User Guide

IPN Guide June, 2009 9
Introducing IPN
IPN Protocol and Architecture
The IPN message is not actually part of the response sent to your website. Rather, the IPN
message is sent to the your listener, which allows you to take actions that are not directly tied
to the operation of your website.
NOTE: The diagram does not show the IPN authentication protocol messages that validate the
IPN message.
IPN is an asynchronous message service, meaning that messages are not synchronized with
actions on your website. Thus, listening for an IPN message does not increase the time it takes
to complete a transaction on your website.
The IPN message service does not assume that all messages will be received by your listener
in a timely manner. Because the internet is not 100% reliable, messages can become lost or
delayed. To handle the possibility of transmission and receipt delays or failures, the IPN
message service implements a retry mechanism that resends messages at various intervals
until you acknowledge that the message has successfully been received. Messages may be
resent for up to four days after the original message.
NOTE: Unless you are certain that a failure occurred on the the Internet, the most likely cause
of lost, delayed, or duplicate IPN messages is faulty logic in the listener itself.
Because messages can be delivered at any time, your listener must always be available to
receive and process messages; however, the retry mechanism also handles the possibility that
your listener could become swamped or stop responding.
The IPN message service should not be considered a real-time service. Your checkout flow
should not wait on an IPN message before it is allowed to complete. If your website waits for
an IPN message, checkout processing may be delayed due to system load and become more
complicated because of the possibility of retries.
IPN Protocol and Architecture
IPN is designed to be secure, reliable, and asynchronous. To meet these requirements, the
protocol requires you to acknowledge receipt of IPN messages. The IPN service provides a
retry mechanism to handle cases in which a message is not acknowledged; for example, when
a transmission or receipt failure occurs.
When you enable IPN, PayPal sends messages to the IPN listener at the URL you specify in
your account’s profile. You can override the URL to associate other IPN listeners with specific
transactions. In this case, you specify the listener’s URL when you set up a Website Payment
Standard button or a PayPal API operation.
The IPN protocol consists of three steps:
1. PayPal sends your IPN listener a message that notifies you of the event
2. Your listener sends the complete unaltered message back to PayPal; the message must
contain the same fields in the same order and be encoded in the same way as the original
message