Instant Payment Notifications (IPNs) allow you to receive notifications whenever the state on an object changes (or something important happens to that object). To learn how to set up IPNs, read the IPN tutorial.
To set up IPNs for an object, set a callback_uri on that object. Whenever something important happens to the object that we think you should be notified of (typically a state change), we will make an HTTP POST request to your callback_uri with the object_id in the body of the request.
IPN HTTP Request Details
The HTTP request that we make to your callback_uri will have the following characteristics:
- It will be a POST request
- The object_id will be in the body of the request (and not added as a url-parameter)
- The object_id will be named for the type of object (for example checkout_id=12345 or account_id=51232)
- For checkouts and preapprovals, the reference_id will also be in the body of the request (if a reference_id was set).
- We will preserve any url-parameters you add to the callback_uri (so you could receive a POST request to http://example.com/ipn?user=12345)
If your callback_uri returns a non-200 response code when we make a HTTP request, we will consider the IPN to have failed. If the IPN fails, we will retry 6 times:
- the 1st retry will happen 15 minutes after the initial attempt
- the 2nd retry will happen 30 minutes after the 1st retry
- the 3rd retry will happen 1 hour after the 2nd retry
- the 4th retry will happen 6 hours after the 3rd retry
- the 5th retry will happen 12 hours after the 4th retry
- the 6th retry will happen 24 hours after the 5th retry