My understanding is that we are supposed to use the original transaction ID to link to a user, but that's not a one-to-one mapping.
Let's say I work for ACME Inc and we offer an in-app subscription to content. A customer downloads our app. Inside the app, they create an ACME account (A). Then they purchase the subscription within the app. During verification and fulfillment, we save the user's ACME account ID and the original transaction ID from the Apple receipt. Great!
At some point, the user cancels the subscription and doesn't use the service for some time. When they decide they want to use it again, they open the ACME app and can't remember their login for ACME account (A). So, instead of recovering the account, they create a new account (B). Then they purchase a subscription. We save the user's ACME account ID and the original transaction ID from the Apple receipt.
The original transaction ID will be the same in both cases, but the ACME account is different.
Now, when I get an App Store Server Notification - https://developer.apple.com/documentation/appstoreservernotifications, I use the original transaction ID to lookup which ACME user it affects. How do I decide which of the two ACME accounts (A or B) it pertains to?
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
App Store
Subscriptions
App Store Receipts
App Store Server Notifications