How to distinguish between subscription purchases made through the app and directly from the App Store

We are wondering if it is possible to distinguish between purchases made through our app and those made directly from the App Store in the subscription process.

Does the API information such as Server notifications v2 and Get All Subscription Statuses contain information that can distinguish between these cases? If not, we are thinking of using the appAccountToken included in JWSTransaction to distinguish between them. We are aware that appAccountToken is set when an appAccountToken or applicationUsername is given to an app when purchasing a subscription. Therefore, we believe that the appAccountToken of JWSTransaction is not set when you purchase a subscription directly from the App Store. We think that by setting the appAccountToken for purchases made through our app, we can distinguish whether the subscription was purchased directly from the App Store or not, but is this an appropriate way to do so?

Please let us know if there is a case where the appAccountToken is set even if the subscription was purchased directly from the App Store. https://developer.apple.com/documentation/appstoreserverapi/appaccounttoken

Answered by App Store Commerce Engineer in 792895022

Hello!

appAccountToken will remain unchanged if user upgrades / downgrades via Manage Subscriptions screen in Settings or App Store or resubscribes within 60 days of churn. Also redeeming an offer code via App Store that leads to an upgrade should preserve appAccountToken. There's no reliable way to distinguish between transaction made inside the app vs outside of the app relying on info from StoreKit, App Store server APIs and App Store Notifications V2 only.

Please file an enhancement request via Feedback Assistant adding details about expected technical considerations and the use case for such a feature, and share the FB# ticket number here. Thank you!

Accepted Answer

Hello!

appAccountToken will remain unchanged if user upgrades / downgrades via Manage Subscriptions screen in Settings or App Store or resubscribes within 60 days of churn. Also redeeming an offer code via App Store that leads to an upgrade should preserve appAccountToken. There's no reliable way to distinguish between transaction made inside the app vs outside of the app relying on info from StoreKit, App Store server APIs and App Store Notifications V2 only.

Please file an enhancement request via Feedback Assistant adding details about expected technical considerations and the use case for such a feature, and share the FB# ticket number here. Thank you!

How to distinguish between subscription purchases made through the app and directly from the App Store
 
 
Q