In-app purchase for 30 days

hello ,
i am making app like netflix,amazon prime video , hotstar
so , i want in app purchase where user can buy monthly subscription
for example - in app a user buy monthly subscription for 30 day
after 30 day user unable to use subscription show your subscription end
buy again

is this possible :grinning: :frowning:

When user buy subscription then get current date and time from online web and + 30 days to that date and store in your database.

1 Like

yes, that’s possible

read more about subscriptions here

Subscriptions: A subscription is a product that provides access to content on a recurring basis. Subscriptions renew automatically until they’re canceled. Examples of subscriptions include access to online magazines and music streaming services.

which means, each time you have to check, if the subscription still is active, see the subscription lifecycle here


1 Like

Try this blocks

1 Like

Or you can use this method:

If user completes payment record the expiry date and store it in tinyDB also show it in a label after login as Subscription expires on.

Whenever user try to login compare the present day with expiry day(stored in tinyDB).

  1. If the login date is less than or equal to expiry day proceed your app to auto login.

  2. If the log in date is greater than the expiry day set login button to invisible or disable it and enable the subscription button .

1 Like

to my knowledge, Subscription does not work with the default In_App_billing component.

I don’t recommend this method because if a user changes the device or unfortunately the device is rebooted and cached the user will lose his/her subscription and will give your app a bad review.

I would like to recommend @Taifun Extension but yet for the next update on In-App-Billing of @Taifun, I would like to ask him to come with a new method that can allow the user to get his/her subscription even when the device is changed, etc.


May be, Instead of choosing tinyDB he can use firebase to save payment date. So it can solve all of his problem. As per his query i answered.

That is a good method for professional users but how about the newbie who doesn’t know about all about the database system?

The user is not responded so for the above posts. Suppose if he is active and starts respond , he can be helped with all the requirements(even the blocks :wink:). In our community we are having very detailed guide on how to use firebase (for beginners). If he is able to make app mean, certainly he can understand the logic and learn quickly. Also to help him, plenty of good peoples are here in our community.

you do not have to setup your own logic… Google will take care of that… you only have to check, if a subscription still is in state Purchased or not

that feature already is available in version 2, you only have to call LoadOwnItems
btw. I’m currently testing the new version of the billing extension, which uses the Google Billing API Version 3 directly…


1 Like

I am curious waiting for this :pray: :man_technologist: