qonversion / unity-sdk

Unity SDK for cross-platform in-app purchase and subscription infrastructure, revenue analytics, engagement automation, and integrations
53 stars 5 forks source link

CheckEntitlements returns past already consumed purchases #246

Open WiseKodama opened 2 months ago

WiseKodama commented 2 months ago

In our app we offer only consumable purchases.

At the start of the app once the purchases/products are loaded we call Qonversion.GetSharedInstance().CheckEntitlements() since this is what is in the documentation: You need to call the checkEntitlements() method at the start of your app to check if a user has the required entitlement. This method will check the user's receipt and return current entitlements. This returns already consumed purchases and their entitlements.

Note that I did not verify the boolean value of IsActive of the returned entitlement.

As far as I know consumable purchase support is still in progress, correct?

@SpertsyanKM tagging you here since you were able to help me before, apologies if this is someone elses territory.

SpertsyanKM commented 2 months ago

Hello, @WiseKodama.

If you are selling only consumable products, what entitlements do you check in your app? Entitlements are intended for subscriptions and non-consumable in-apps. Can you explain your use-case please?

WiseKodama commented 2 months ago

Hello @SpertsyanKM, great to hear from you again :)

Basically entitlements are cross linked with our products in the dashboard for easier identification after a purchase has completed.

We also needed to use qonversionInstance.UpdatedEntitlementsReceived += OnEntitlementsUpdated; in order to handle pending purchases.

As for the issue at hand we are unsure why it would return already consumed entitlements? It shows that there is support for consumable purchases: https://hub.qonversion.io/roadmap/consumable-in-apps-support-from-the-sdk

Basically our use cases are:

Currently there is no option to mark a product as consumable in the dashboard.

SpertsyanKM commented 2 months ago

I'm discussing your case with the team and will return soon

SpertsyanKM commented 2 months ago

Sorry for the late reply.

While we support consumable in-app purchases, we don't support pending purchases for that type of products. This means you can't identify such a purchase with an updated entitlements listener, cause it doesn't actually grant an entitlement (or the entitlement should also be consumable, but that is not so for now).

In a couple of days, we'll discuss with the team the priority of this feature. As soon as I have any news, I'll share them here.

WiseKodama commented 2 months ago

I already tested pending purchases and the cases mentioned worked.

However recently it started occurring that the SDK was returning already consumed entitlements if the app was reinstalled.

So something must’ve changed to cause this issue. Please let me know if there are any workarounds for the issue at hand.

On Wed, 21 Aug 2024 at 16:43, Kamo Spertsyan @.***> wrote:

Sorry for the late reply.

While we support consumable in-app purchases, we don't support pending purchases for that type of products. This means you can't identify such a purchase with an updated entitlements listener, cause it doesn't actually grant an entitlement (or the entitlement should also be consumable, but that is not so for now).

In a couple of days, we'll discuss with the team the priority of this feature. As soon as I have any news, I'll share them here.

— Reply to this email directly, view it on GitHub https://github.com/qonversion/unity-sdk/issues/246#issuecomment-2302223840, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGC7FIM6GAL6ETYCLKCCR7TZSSRPNAVCNFSM6AAAAABMXTUB7CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBSGIZDGOBUGA . You are receiving this because you were mentioned.Message ID: @.***>

SpertsyanKM commented 2 months ago

If you link your in-app product to some entitlement, we will grant a lifetime entitlement for the purchase of that product (no matter it is consumable or not) - that is the expected behavior for now. That is why you receive an entitlement for the consumed purchase

WiseKodama commented 2 months ago

Apologies for the slow response @SpertsyanKM

Are there any plans to make Qonversion work with Consumable purchases that will also cover pending/out-of-app purchases?

SpertsyanKM commented 2 months ago

Yes, we plan to implement this feature by the end of this year.

WiseKodama commented 1 week ago

Hey @SpertsyanKM 👋 Any chance there is an issue/task tracker for non-subscription purchases support?

SpertsyanKM commented 1 week ago

Hi @WiseKodama,

I think, you can follow this feature request in our hub.