@KPsingh, you can read my answers in thread
https://developer.apple.com/forums/thread/681607
A summary:
In our case, when the user makes a purchase in the app, we send the
userID, and the original_transaction_id, the purchased product to a URL
in our backend server, and register that information in the database
(using the original transaction_id as the database primary key).
When we receive notifications, using the auto_renew_product_id and
the unified_receipt.pending_renewal_info we get the
original_transaction_id afected in the notification. That
original_transaction_id will be used to query the database, and get the
userID related to that purchase.