original_transaction_id changing

I am implementing IAP for an autorenewable subscription. I decode the receipt on the device. I noticed in the sandbox that the original_transaction_id is changing for each renewal. (It is always the same as the transaction_id which differs for each renewal, as it should.) Can anyone confirm that this is NOT what happens in production?


A WWDC video states that the original_transaction_id for an autorenewable subscription can be used to associate different devices owned by the same user. I had always thought that the original_transaction_id would differ from device to device. Can anyone confirm that in production the original_transaction_id is the same across all devices owned by the same user for an autorenewable subscription?

Replies

Hello, PBK

I do the decoding passing the receipt from the app to our server, and calling verifyReceipt. And I receive the same original_transaction_id when making purchases from different devices.

I think that you'll get a different original_transaction_id when:
  • You make a purchase belonging to a different subscription group, or

  • When more than 180 days have passed since you made the last subscription purchase, so you will not be able to resubscribe to an expired subscription, and you will have to make a new purchase (of which you will receive an INITIAL_BUY notification if you have active server notifications).

  • Hi oscaretu,

    Can we update this 180 days to a smaller period?

    Also, correct me if I'm wrong but based on your answer and what I've learned on the net, the point of the original_transaction_id is to identify the whole period or term of a subscription of an apple account. For example, when an apple account cancels their subscription, it is technically still under the "group" of that original_transaction_id but the user is just not entitled to any of the features of your plans/products unless they resubscribe. Then when no subscription activity is made since your last subscription (180 days passed), then the original_transaction "group" is done. At that point, when the user tries to purchase a plan, apple will give a new original_transaction_id.

    Is these correct? Not sure if we can replicate the "end process" (180 days passed) of a subscription in sandbox.

Add a Comment