How do we find out User information form Apple server notifications?

How do we find out User information from Apple server notifications?

I have created a user and purchased an In app product from Apple . I have received a INITIALBUY notification from the App store.
Apple ID : xxxx@gmail.com
User : ABC (User id :111)
The JSON receipt contains the following fields.
"latest
receiptinfo": {
"transaction
id": "1000000657540200",
"originaltransactionid": "1000000657537943",
"quantity": "1",
"subscriptiongroupidentifier": "20623048",
"isinintroofferperiod": "false",
"purchasedatepst": "2020-04-27 23:41:05 America/LosAngeles",
"is
trialperiod": "false",
"expires
dateformattedpst": "2020-04-27 23:46:05 America/LosAngeles",
"product
id": "com.***.iap1.5",
"weborderlineitemid": "1000000052078939",
"uniquevendoridentifier": "xxxxxx-xxxxxxx"
},

I have created one more user  from the same Apple id and purchased the same product.
Apple ID : xxxx@gmail.com
User : XYZ (User id :222)
  "latestreceiptinfo": {
"transactionid": "1000000657540202",
"original
transactionid": "1000000657537943",  
 "product
id": "com.***.iap1.5",
"weborderlineitemid": "1000000052078942",
"uniquevendoridentifier": "xxxxxx-xxxxxxx"
},  

I have store user information based on productid- 
original
transaction_id =>user 

xxxx@gmail.com -  com.***.iap1.5 - 1000000657537943 -ABC

xxxx@gmail.com - com.***.iap1.5 - 
1000000657537943 -XYZ

In this case I could not track the user information.Duplication will come

From the same Apple id ,2 different users buy the same product Apple will give the same original transaction Id.

Is there any other field to differentiate transactions to find users ?
Is there any option to include User name on JSON server notification from App store.

Did you solve this?

Same question

Same question

Same question with v2 notifications. When a user redeems an offer code outside of our app, we need some way to tie it to a user on our backend side.

Please share any solutions you may have come across. Thanks

Try use appAccountToken() you can set appAcountToken with your custom token (with user data) then app store server will send your token in the payload in transaction body. Read this https://developer.apple.com/documentation/storekit/product/purchaseoption/3749440-appaccounttoken

Hello, did you solve this issue? I have same problem. When I get unsubscribe notify from Apple, I cannot know which user's subscriptions since they have same original transaction id.

How do we find out User information form Apple server notifications?
 
 
Q