Offer in-app purchase before account creation process

Apple suggests to let users finish in-app purchase first before creating an account. Then take them through adeanonymizationstep afterwards. To do that, what's the best way to identify the unregistered customer? UDID or the original tranaction ID? If use UDID, how can we know the user is actually a customer once they switch to another iphone? Same situation with original tranaction ID maybe?


Ref:https://developer.apple.com/videos/play/wwdc2018/705/?time=1228

Replies

A user who purchases an IAP will have an original_transaction_id (from the receipt) that will be the same across all devices that download that app and restore that IAP under that user's AppleID. The original_transaction_id is the same as the value for transaction.originalTransaction.transactionIdentifier in a call to updatedTransactions after a restoreCompletedTransactions.