Are auto-renewing android in-app subscriptions have to be consumed?
Asked Answered
R

1

8

After hours reading documentation about android in-app product and subscription I am still stuck asking me about consumption process regarding in-app auto-renewing subscription.

What Google says about consuming

It's up to you to decide if you want to handle your managed products as non-consumable or consumable items

Non-consumable products

Typically, you would not implement consumption for managed products that can only be purchased once in your application and provide a permanent benefit. Once purchased, these products will be permanently associated to the user's Google account. An example of a non-consumable managed product is a premium upgrade or a level pack.

Consumable products

In contrast, you can implement consumption for products that can be made available for purchase multiple times. Typically, these products provide certain temporary effects. For example, the user's in-game character might gain life points or gain extra gold coins in their inventory. Dispensing the benefits or effects of the purchased product in your application is called provisioning the managed product. You are responsible for controlling and tracking how managed products are provisioned to the users.


In the other hand the Google Play Billing tell us that we have the following types of in-app products :

  • One-time products (managed products)
  • Rewarded products
  • Subscriptions

Reading this we could think that subscriptions aren't managed product..

I am trying to refacto a part of an app, at the moment the current version get the inventory (with an IabHelper), get the last monthly purchase (proceed automatically by google), send the information to our API to get user premium again and consume this last purchase after the API result.

Because I am now checking the monthly payments directly from our API, to remove this part from the Android app : Do we absolutely have to consume the monthly purchase proceed automatically with the auto-renewing Google in-app ?

Rifle answered 24/3, 2019 at 20:40 Comment(4)
According to official doc, Subscriptions are made recurring and it gets renewed once it's period is over. So, yes Google in-app handles that stuff automatically and it provides Real-time developer notification about that. see here : developer.android.com/google/play/billing/billing_subscriptionsMorbilli
Thanks @JeelVankhede, as you said Google in-app handles that stuff automatically, but what if I don't consume the purchase generated ?Rifle
I guess it will be auto consumed for subscription type products, but you've to consume manually for one-time products to make that product available again.Morbilli
thanks, I am guessing that, like you. The problem is I am in a kind of a situation where I can't only guess...Rifle
R
2

After working around in-app subscription (with our own API/Server) process for Android and iOS app, I think I found my answer.

In-app subscription android process

  • When a Android or iOS user makes a subscription, my app (in my case) completes the transaction and sends it to our own API (through /android_purchase POST) with some parameters (see the workflow above).
  • Right after our API verifies the transaction with Google (through /verify) and sends back the answer to our apps (giving the user access to premium content or not depending on the /verify result)

But how your API can know if the user cancel the subscription or just know if the subscription has been renewed correctly ?

Actually (and a lot of developer reading this know that) Google and Apple allow you to give them an API endpoint to get notified (in my case /in_app_notifications). Thanks to this feature, Google will notify us for each renewal or cancelation or even the first subscription action.

You can find some documentation about it here https://developer.android.com/google/play/billing/realtime_developer_notifications.html

This kind of workflow let us implement a clean workflow without any front-side check. Actually some apps check the last user payment at each app launch to notify the API and keep the user premium or not.


What if the user doesn't open your app for two months ?

Do you really think that the subscription is canceled by Google and Apple ?... In my mind the answer is no. For me, this workflow demonstrates that it's not the case. In the same way, if your android app doesn't consume the item purchased (in my case of a monthly in-app subscription) it won't "break" the subscription. Android will renew it at the end of the month and notify your API.


I know that my answer is not complete, and may be some developers will share some others searches, but I was struggling with this question about in-app subscription process and I wanted to share my findings to save your time if you are in the same situation !

Rifle answered 21/5, 2019 at 22:36 Comment(2)
Hi there! @nekflamm.. I'm in the same situation.. my users are subscribed but I'm not sure how to check if they canceled and still have access to content. How do I verify it? Do you know?Ava
@Ava If you've backend server setup properly. Check the status of subscription from your server on your app launch. As Google updates the linked server with canceled subs. Additionally billing client by google can list the current logged-in users subscriptions as well.. You can cross match those to your server.Rowell

© 2022 - 2025 — McMap. All rights reserved.