Question

One-time purchase goes through, grants entitlements, BUT after restart, all entitlements are gone and user is seen as free user.

  • 6 August 2022
  • 1 reply
  • 62 views

Badge +3

This only happens to one of my apps, my first app persist entitlements until it’s uninstalled, however my new app that has an one-time-purchase, grants the entitlements after payment but when the app is restarted, the entitlements are all gone despite the payment going  through, I can re-purchase it too.

 Is it cause im using the same service account json for both apps? 

The code shouldnt be wrong cause im using the same on both apps and the first one works.

What could be wrong?

 

I DID notice that I forgot to put the new app in the service account permissions, which i thought would fix the problem, but I still have the same problem.


1 reply

Userlevel 5
Badge +8

Hi @Jocko

🤔

I think there might be an issue with how you’re configuring the SDK. When you call setup, you need to make sure that if you’re passing in an appUserID, the same one is passed in for the same user. I.e.: if you call setup twice with different appUserIDs, the SDK will consider them to be two different users. 

 

You can also not pass in an appUserID at all, in which case the SDK automatically generates one for you. 

 

If you’re not passing in an appUserID, are you by any chance deleting shared preferences? The SDK uses shared preferences to store its data, so if that’s getting deleted, the SDK will consider it a fresh install. 

Reply