I'm working on integrating PayPal subscriptions into my system, and I'm trying to figure out if it's possible to get all active subscription details for a user using the payer_id
(also referred to as user_id
).
In PayPal's User Management section, I can see there's an API to get user details, which includes information like the user's name, email, and address. However, I'm not able to find a way to retrieve any subscription details directly tied to the payer_id
.
In my setup, when a user subscribes, they get assigned a payer_id
, which I can retrieve using webhooks. I would like to know if there's a way to query PayPal for all subscriptions associated with that payer_id
.
Is there any API in PayPal that allows fetching subscriptions by payer_id
? Or is maintaining a mapping between payer_id
and subscription_id
in my own database the only approach?
Any guidance on how to achieve this or workarounds would be greatly appreciated!