2

I feel this topic is being discussed again and again and yet I fail to identify one single correct way to manage this. The problem:

-> Auto-Renewable subscription (monthly):
-> Single iTunes account
-> Multiply app user accounts
-> HOW DO I DETERMINE WHO OWNS THE SUBSCRIPTION

Use case:

  1. UserA buys subscription ( I create entry on server "app_userId, original_transaction_id, web_order_id")
  2. UserA logs out (or deletes app etc)
  3. UserB logs in (same iTunes account) -> few weeks later sub expires
  4. Subscription automatically renews -> UserB gets transaction update - I use original_transaction_id to check if this subscription actually belongs to UserB ( it this case: NOT) -> exactly what I need to know. (only userA can use subscription under this iTunes account)

Is my understanding correct that in case of renewable-subscription: -> original_transaction_id never changes (although i've seen stackoverflow tickets where people claim that it does! or it does after restore , or on another deivce... ->personally, testing on another device (restore) -> it does not change so far... But can someone confirm it'll never change?

-> web_order_line_item_id - it can only tell me who does the 'current active' subscription belongs to (provided I also store that information on server) - but as soon as subscription renews -> it's useless (new for each renewal).

I've already spent over a week on the topic and still struggling :) It's insane...

Pawel Klapuch
  • 380
  • 4
  • 15

1 Answers1

0

Apple's docs on original_transaction_id imply that it doesn't change for a typical purchase, restore or renewal, but that it will change if there's a new purchase.

For a past project I inserted a "silent" restore into the purchase workflow ahead of the actual purchase to pre-check for an active subscription since it was possible that a user didn't do a restore on an app re-install. If it was active then I short-circuited the purchase with an alert saying that the subscription was already active.