Search code examples
paypalpaypal-adaptive-paymentspaypal-subscriptions

Is it possible to unsubscribe an user via the Paypal Adaptive payment API?


My users subscribe to my project using the paypal button "Subscribe", and then I manage the monthly payments via the IPN, but if the user delete his account, I'd like to unsubscribe him automatically, without asking him to go to Paypal to cancel his subscription.

Is it possible to use the Paypal Adaptive Payment API to tell Paypal to unsubscribe this user ?

Bonus question : is it possible to use the Paypal Adaptive Payment API to know the status of the subscription, and eventually also to modify it (lower the amount for example) ?


Solution

  • You wouldn't use the Adaptive Payments API to unsubscribe a user from a subscription. If the buyer signed up for a subscription, you could ManageRecurringPaymentsProfileStatus API to cancel the profile. As for the status, you would not be able to use the "GetRecurringPaymentsProfileDetails" API call to get the status for subscriptions. This would only be supported for recurring payments, not subscriptions. However, you could use IPN which would send you the details when the profile gets created, when a new transaction is processed, and etc. Then you could just query your own database for the details.