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 ?

[Updated]
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.

Taifun

2 Likes

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…

Taifun