GET list of billing agreements using Paypal REST api

I'm working with the relatively new Paypal REST Aviation and will successfully be able to create billing plans, approve billing plans, get a list of my billing plans, create billing agreements (subscriptions), execute billing agreements, and find specific billing agreements.

I would like to get (GET) a list of billing agreements, similar to how I can get a listing of billing plans. It is not shown in the documentation as being available. Does anyone know how to do this? Since the web host is not available for cancellations (or any subscription events) and there is no way to get a list of agreements, this leaves developers with an inefficient way to handle cancellations (especially since users can cancel through Paypal without visiting the site). My current method / plan for this is to go through all the subscriptions I have stored in my MongoDB (I store them when they are successful) and send a request to Paypal for that particular agreement. I check its status and update MongoDB if they don't match.

There must be a better way.

+3


source to share


1 answer


I had the same problem, my first solution was almost identical to yours: I ask for the consent state when the user logs in and update the state in my db accordingly.



Later I start using IPN as my solution as suggested in this github comment from Tony: https://github.com/paypal/PayPal-Python-SDK/issues/69#issuecomment-69647946

+1


source







All Articles