Search code examples
paypalpaypal-ipnpaypal-subscriptions

PayPal Subscription IPN events confusion


I'm having a hard time knowing which IPN events I need to handle, it's kind of a bit confusing for me, so I thought I would confirm that the ones I handle are sufficient or if I'm missing any significant events.

I'm simply trying to have the user subscription activated on my end since they subscribe until they unsubscribe, which should be straightforward using subscr_signup and subscr_cancel

But it gets confusing once you start reading the events for retries, if failed while already a subscriber (if that could happen), if having insufficient balance, etc..

I have read their documentation on those events, but a sentence for each event is far from enough for me to get the whole picture, so I was wondering if anyone knows better

https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/


Solution

  • Late edit: I just realized the original question was more focused on Subscription IPNs in particular, so I changed its title. Subscriptions are tricky because you need to pay attention to whether it's a message about the subscription itself being updated for the future, like subscr_cancel, or a message about the present term of the subscription ending, like subscr_eot. These are different things, and user207421 linked to a helpful answer: Subscriptions with Paypal IPN


    The short answer is, handle the events that you want to handle. This is a business/implementation decision; we can't tell you what you should do.

    If you are in doubt, log all IPN messages to a flat text file so that you can always go back later, review what you've received, and decide whether you want to add new automatic handling of certain events.

    You need to know what you want your IPN handler to do in the event of each type of message, and we can't answer that for you.


    For what it's worth, IPN is an older technology of PayPal's. The newer one is called Webhooks, where you choose to subscribe to particular events. And if you don't subscribe to them, you simply don't receive them. Because it all really is your choice as far as what you want to do and handle; no one can tell you what you should do, that's your job as a software designer/architect. Here is the PayPal Webhook documentation for anyone wondering: https://developer.paypal.com/docs/integration/direct/webhooks/