Auto-renewable subscriptions issue with owns app users

Dear Apple, I am trying to implement IAP with Auto-renewable subscriptions in my app. My app has his own system of users and I want to implement this behaviour: In the same device, if the user logged buy a subscription, then the user logout and other user login, I want to this user can buy is own subscription. What is more, if user A has already subscribed, then logout and login by other user, next is that restore this subscription. I strongly believe he is able to subscribed successfully. How to fix in this scenario. Many thanks, David Tong

Replies

First - this is a developer forum. Rarely do Apple employees respond.


Second - I believe you are asking to restrict a purchased subscription only to a person who has a particular username on your system. here's one way to do that:

1) before a user purchases a subscription inform them that the app uses their account on your system to grant them copies of their subscription to other devices owned by them.

2) when a user makes a purchase, record the web_order_line_item_id value in the receipt. Register their purchase on their account on your system using this web_order_line_item_id value. (Typically the purchaser will also be logged into your system when they make the purchase but if not, allow them to register the purchase at a later time when they next log onto your system.)

3) When a user tries to register a subscription on your system, check the web_order_line_item_id against all other web_order_line_item_id previously recorded by all other users on your system. If there is a match, reject the subscription by politely stating that that subscription is already assigned to a different account - perhaps tell them whose account (e.g. their father or their neighbor). (I believe you can also do this with original_transaction_id but I think that refers to the renewal event, not the entire subscription - I'm not sure.)

Thanks for your reply. However, i would like to make a clarification on your solution.

1. User A makes au auto renewable subscription, then we will record web_order_line_item_id and store on server or local device.

2. User B also makes one, then we will parse their receipt and compare to recorded all web_order_line_item_id on server or local device. If there is a match, the app will be notified to the user since their apple id is assigned to other users in your system.


Please let me know if there are any wrong. Once again, thanks for your idea.


Regards,

David Tong

User B is "User B" on your system not on Apple's system. On Apple's system User B and User A are the 'same person' because User B made a purchase of the subscription under the same App Store account as User A. User B may be entitled to the subscription. You need to offer to User B the ability to transfer the subscription from User A to User B.


For example; suppose I had an account on your system and changed my account after two years but did not change my App Store account.

Yes I'm taking about user A, user B on my system not Apple. Since i want to user B must purchase subscription if they want to use. It means we will separate subscription for each user. Let me give you an example regarding what i want to implement.


- My app has reminder feature that needs to subscribe subscription prior to using. This is my scenario:

I use User A in my system purchase it.Then log out user A, using user B in my system logs in and purchase this function. However, since i used same apple account to purchase for user A, as as result i see a dialog 'You have currently subscribed to this'. My issue is i don't want to share it to other users in my system which means each user must subscribe own subscription.


I hope it's clear enough to you.


Many thanks,

David Tong

Yes, I understand. The solution is described above using the web_order_line_item_id to identify a particluar purchase and assign it, on your system, to a particular user.


But you should give a user (for example User B) the ability to tell your system that a particular purchase (with a particular value of web_order_line_item_id) should be credited to them (User B) not a different user (User A). So if I have two accounts on your system and accidently purchase a subscription when logged into your system as User A I should be able to tell your system - no....credit that purchase to me as User B and stop the subscription of User A. Your system should then check with User A and be sure that User A agrees to the transfer.