In app billing - How to check if the subscription is expired or not?

When we use in app billing subscriptions, how do we check if the users subscription is expired and they haven’t renewed it ?

I have an app which provides free and premium features. Premium features are subscription based.

What I currently do is, I load owned purchases and if there’s any owned subscription, I set the user as premium.

But only recently I knew that even if the subscription is expired and user did not renew it, It loads into owned Subscriptions list.

Is there anyway I can check this ?

My current blocks :
init iap
iap got owned purchases

yes, this is the way to go

in this case it should not be in list ownedSubscriptions…

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.



Better you can go through with this guide first, and check up whether you have designed blocks as suggested by the guide. And try to find the mistake where you did it. If not post your relevant method to point out your mistake as said by @Taifun

1 Like

I updated the post with block images. can you take a look please.
Even my subscription is expired (Grace period also over), it is loaded to List_View1.

The problem is you should put the list view if the list is not empty. As per your block list view will be visible even if he purchase it or not.

But how can Listview can get expired purchases if the list is empty ? Probelem is the list is not empty, It gets exact same subscription ID to the list, which was expired.
Even if I put listview in “if the list is not empty”, it still get that expired subscription and sets premium to true.

I think i misunderstand it… i thought that list should show o ly for the premium users ok… wait… let me see it once again

your blocks in the GotOwnedPurchases event look fine
my guess is, there is a bug in the billing component…


Subscription is not working for me. I use the purchase of products, and I save the date of purchase. year and month. Then I check if the time of the purchased purchase has expired, if it has expired, I ask to buy again.

you do not have to do that… Google already takes care of it…
usually (not in all countries) Google renews subscriptions automatically
PS: I’m not sure, if there still is a bug in the subscription part of the Kodular billing component… let me recommend to use the billing extension App Inventor Extensions: Billing | Pura Vida Apps… note: there are also other billing extensions around…

Signatures are still in error in Kodular. Then I use product purchase and check the date, if expired I ask to buy again. In fact, many users do not like subscription subscriptions because they renew automatically and sometimes it is difficult to cancel.