I am trying to pass the user id with the webhook or the subscription so that i can know which user has subscribed. I have seen Stripe do this and the ipn methods for paypal do it so is there a way to do this by their REST API? Is there a better way to do this? i have seen a few hack ways of doing it but they don't seem like the best way.
I am trying to look for ways so i think i can maybe pass the subscriber id by javascript on approve of the subscription and then use that to identify the user but i would rather not use ways that can be manipulated by javascript.
In your createSubscription
API request or JS payload, add a custom_id
. It will be returned in any future webhook events you have subscribed to for that client id.