Handling Multiple Subscription in GooglePlay - in-app-purchase

In ios and amazon - we have a subscription family - example if i have purchased a one month subscription, I cannot purchase a six month subscription of the same family. But it appears that this is not the case in google play. For example a user might have a monthly subscription running with a one year subscription also running simultaneously.
Do we have to handle the logic of not allowing a user to purchase a second subscription if he has already subscribed to one subscription?

In iOS the user can change duration for the same subscription family though their iTunes subscription management page. On android you must implement this in the app using the getBuyIntentToReplaceSkus() method:
This method is used to upgrade or downgrade a subscription purchase. The method is similar to getBuyIntent(), except that it takes a list of already-purchased SKUs that are to be replaced with the SKU being purchased. When the user completes the purchase, Google Play cancels the old SKUs and credits the user with the unused value of their subscription time on a pro-rated basis. Google Play applies this credit to the new subscription, and does not begin billing the user for the new subscription until after the credit is used up.
http://developer.android.com/google/play/billing/billing_reference.html#upgrade-getBuyIntentToReplaceSkus

Related

Differentiating two Users for In-App Purchases in Application to Buy Non-Renewable Subscription by different users?

I am implementing In-App Purchases first time in my application and new to In-app purchases Store Kit.
I have few doubts regarding In-app purchases:
What happens if a user purchased a subscription and logged out from the application and another user logs in and trying to purchase the same?
Does iTunes allow the second user to use the First user's purchased product?
If it allows how can we handle the second user's subscription?
What details we will get post Successful/Failed transactions from itunes to save in my database?
For a non-renewing subscription then it is entirely up to you to track expiration and determine what content a user has access to and when.
For example, say your subscription gave access to "the word of the day". If the subscription was active for the month of January, then the user would receive access to new words each day in January. The user should continue to be able to see January's words even after the subscription expires, but no new words.
If they resubscribe in March then they would now get new words throughout March.
You need to track all of this on your server against the user account.
Non-renewable subscription IAPs act much like consumable IAPs. The "Restore purchases" Store Kit function does not restore non-renewable IAP items.
To answer your specific questions:
If a new user logs in to your account system in the app (but the same iTunes account is still active on the device) then a second purchase will succeed and you need to update the subscription start and end dates for the new active account on your server.
You also need to cater for the following:
- The original account logs back in; In this case the original subscription entitlements need to be available
- The original or second account log in to another device; Again, the accounts subscription entitlements need to be available.
No, since non-renewing subscriptions are not restorable, the second user cannot "use" the first user's subscription.
You handle each account in your system independently.
Information about the mechanics of the purchase process are described in the In App Purchase Programming Guide

Publishing application for specific duration

I am first time developing an application which will have licensing to iPhone Application,
Our requirement is to develop an application that will have a license key and a subscription period, say 1 Month, 6 months, 1 Year.. Etc.
Once the subscription period is over user should not be able to reinstall the application without new subscription and license key, even if he/she has uninstalled the application.
How can this be done?
You could use a Non-Renewing Subscription in app purchase, This is the description in iTunes Connect : Non-Renewing Subscriptions allow the sale of services with a limited duration. Non-Renewing Subscriptions must be used for In-App Purchases that offer time-based access to static content. Examples include a one week subscription to voice guidance feature within a navigation app or an annual subscription to online catalog of archived video or audio.
or you could use a Auto-Renewable Subscription:
Auto-renewable Subscriptions allow the user to purchase updating and dynamic content for a set duration of time. Subscriptions renew automatically unless the user opts out, such as magazine subscriptions.
Alternative way:
You have to do the subscription process through some website instead of in-app purchase.
Don't go with license key. Just provide login credentials to the user once he subscribed. User has to subscribe externally to use the application (by getting the login credentials by mail to him). If the subscription period over, then just don't allow him to login and ask him to meet administration using the given generic mail id (user has to subscribe again).

What's the difference between consumable and non-renewable subscriptions?

Apple, iOS, IAP.
The official doc says:
Product type - Users can buy - Appears in the receipt - Synced across devices - Restored
Consumable - Multiple times - Once - Not synced - Not restored
Non-renewing - Multiple times - Once - By your app - By your app
Of course consumable can be made same to non-renewing "by my app" if I want to, so what's the exact difference? Why Apple distinguish these two types identical on his side?
Ref: itunesconnect.apple.com
Everything is here:
Consumable (pay everytime)
A consumable In-App Purchase must be purchased every time
the user downloads it. One-time services, such as fish food in a
fishing app, are usually implemented as consumables.
Select Non-Consumable (one time payment)
Non-consumable In-App Purchases only need to be
purchased once by users. Services that do not expire or decrease with
use are usually implemented as non-consumables, such as new race
tracks for a game app.
Select Auto-Renewable Subscriptions (will deduct money from your credit card on a cycle complete)
Auto-renewable Subscriptions allow
the user to purchase updating and dynamic content for a set duration
of time. Subscriptions renew automatically unless the user opts out,
such as magazine subscriptions.
Select Free Subscription (no payment and is still visible even you did not submitted your account detail to itunes connect)
Free subscriptions are a way for developers
to put free subscription content in Newsstand. Once a user signs up
for a free subscription, it will be available on all devices
associated with the user’s Apple ID. Note that free subscriptions do
not expire and can only be offered in Newsstand-enabled apps.
Select Non-Renewing (need to renew manually)
Subscription Non-Renewing Subscriptions allow the
sale of services with a limited duration. Non-Renewing Subscriptions
must be used for In-App Purchases that offer time-based access to
static content. Examples include a one week subscription to voice
guidance feature within a navigation app or an annual subscription to
online catalog of archived video or audio.
Consumable items are individually purchased items. You need to buy one each time you want one. For example, in a game, if you ran out of lives and wanted to keep playing, you can buy an extra life (consumable). Once you use that life, if you need more than you need to buy another one.
Non-renewing is referring to subscriptions. It is the purchase of a subscription to something for a designated time frame, that will not automatically renew/re-charge after it expires. Example would be buying a one month subscription to a weekly magazine app that publishes new content every week. You purchase this one month, non-renewing, subscription and you get access to the app's content for a month. After the month is over, it does not automatically renew itself and will not bill you again.

In App Purchase With daily updates

In my application I have a page where I want to sell a single article via In app purchase.
The article for the user will be available for the user for only one day.....
and the other day if the new article is available then the user should be directed to buy that other article for that day
Prices will be same for all the articles.
Can anyone suggest me how I can achieve this and how I should register my items into the app store?
You can register consumable product to iTunes. Then when user will purchase that product once flag will be TRUE. After finishing of that day of purchase, flag will be again false. So, user need to buy it again.
The other way you can create subscription product in iTunes. So, user need to subscribe everyday or can purchase subscription of 7 days or 14 days. This is normal way in which we are doing news related application for IAP.

iOS - Inapp purchase - subscriptions

I'm having in-app purchase subscriptions in my app. I'm able to integrate and make subscriptions successfully. There are 3 different subscriptions, monthly, quarter and yearly.
So if user subscribes to monthly user can use that feature for 30 days. There's no server in my case. Only availability of some features will be activated/deactivated according to subscription.
When ever the app starts, i want to check whether user paid for subscription or not. If I'm maintaining some bool value in subscriptions, what if the user has deactivated the subscriptions from settings? How can I detect whether the subscriptions are valid or not?
You can add counter and add that counter value in a database that must be inside your app. Whenever user tries to access subscriptions you can verify from the database.
You have to post the receipt back to apple server and from the response we receive, we can identify the expiry date. Then I'll know whether the subscription is expired or renewed etc.
Visit Apple documentation

Resources