1

I want to keep track of the subscription status of the active billing agreements.

Now I thought webhooks would be handy for this.

I have a listener for BILLING.SUBSCRIPTION.CANCELLED which is described as

This event is triggered when a billing subscription is cancelled.

Now when a user goes to his paypal account and cancels the subscription, nothing gets fired. Only if I use the REST API to cancel the subscription, this hook fires. Where's the point in this? When I do an API call I get instant response that a subscription was cancelled or not, why would sb need an additional webhook for that?

The only useful application for this would be to be in track of what a user does with his paypal account. Now my question is: is this sandbox behaviour? Does the hook fire in "real world" when a user cancels the subscription/agreement through paypal directly?

maddo7
  • 4,503
  • 6
  • 31
  • 51
  • 6 years on, I am having this exact same issue (and the mind baffles at why there wouldn't be a simple REST webhook firing when a user cancels a subscription?!). I have spoken to Paypal support and asked why the IPN simulator doesn't have a "Subscription Cancellation" event (they had no answer, just "you are right, there isn't one" lol) ... so this appears to be a nightmare to simply keep track (on your own app) whether a user is still subscribed/not ... – gvanto Feb 16 '22 at 11:25
  • related question https://stackoverflow.com/questions/72966268/paypal-webhook-when-subscription-ends-expires-not-fired – nuala Jul 07 '23 at 11:17

1 Answers1

1

You will need to use the IPN (Instant Payment Notification) message service for handling user triggered Subscription cancels via the PayPal Dashboard.

You can find a list of Recurring Payment notifications which are sent through the IPN here.

Also, you will quickly find out that their support for the IPN message service is very limited when testing code in development (they have an IPN Simulator, but it doesn't support Recurring notifications). So you will have to go through their variable documentation to see how best to implement the logic in your application.

JellyFishBoy
  • 1,658
  • 1
  • 17
  • 25
  • Now web hook working well? or still have same issue, Can you please help me? – HarisH Sharma Aug 28 '19 at 05:41
  • Does this work in sandbox environment? I am actually surprised this question doesn't have more views/upvotes as I can't imagine how many developers must be trying to do this same thing (keeping track of a subscription cancellation) – gvanto Feb 16 '22 at 11:28