IAP: How to pass appAccountToken when users redeem offer codes

Currently when a user purchases an auto-renewable product we pass appAccountToken when we call purchase(options:) Our backend gets the appAccountToken.

But when a user redeems an offer code there seems no place for us to pass appAccountToken so our backend can receive the notification with appAccountToken.

Hi there! I am also very interested to know if there is currently a way to associate a UUID to a purchase after the code redemption is successful (which can happen in-app or even outside the app in App Store redemption screen).

When a code is redeemed successfully, we get a status update from Product.SubscriptionInfo.Status.updates asynchronous sequence after the purchase transaction is done. From this we have access to the successful transaction, subscription state etc... But we never got the chance to set appAccountToken value in the transaction which is empty, meaning it's also empty in the server notification received by our backend preventing us from identifying which internal account this transaction is attached to.

I guess a solution would be to send the original_transaction_id alongside the UUID from the app to our backend using a custom endpoint, but I am interested to know if there is a way to do that using Apple APIs.

10
IAP: How to pass appAccountToken when users redeem offer codes
 
 
Q