Determined whether a transaction is trial or not

Hi, we are moving from server notification from v1 to v2. In server notification v1, we can tell whether a transaction is a trial or not by parsing latest_receipt, is there any way to find out a transaction is a trial or not in v2?

You'll want to check the offerType field of the JWSTransactionDecodedPayload:

https://developer.apple.com/documentation/appstoreservernotifications/offertype

Free trials are a type of introductory offer, so they would have offerType 1.

Hi, is the offerType 1 unset when the user starts paying? I need to identify whether a transaction is converted from the trial period and starts paying. So my idea is to get the transaction history and check if offerType from the current transaction is unset and offerType from the previous transaction is 1.

Is this approach correct? Is there any other way to achieve this without getting the transaction history?

Thanks in advance.

Determined whether a transaction is trial or not
 
 
Q