简体   繁体   中英

BILLING.SUBSCRIPTION.CANCELLED does not fire upon user action?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM