Once a subscription expires, the profile ignores access levels granting with API. Is it a bug?
complete
G
Gleb Ignatev
Steps to reproduce:
Log in and purchase a subscription.
Cancel the subscription and wait until it terminates.
Now try to grant the same access level for an arbitrary number of days / lifetime.
Expected behavior
The change is applied, get profile API returns the updated access level data
Actual behavior
Get profile API returns the data in the state of the expired mobile subscription; surprisingly though, on the profile page UI there is an event in the history from the manual access level granting and the access level expiry date is correct. The only thing that partially fixes the problem is the profile deletion, but it's done manually, so this is not a production grade solution.
In the image we can see that Expires at under Product is 4 Jun 2023, that's what you get from API. On the other hand, under Access level we can see 12 Jul 2023 and in the User history on the right. That's the expected state, but for some reason the API does not return it.
Adapty Support
complete
G
Gleb Ignatev
Hi, sorry for the long response, didn't have time to process it. This problem keeps appearing in Dev and in Prod and it's typical for account where Adapty automatically copies the mobile subscription access level events and data. Once the original subscription expires, the account freezes. I've tried revoking it, but it doesn't help. So the only cure at the moment is account deletion, which is really inconvenient
Adapty Support
Hi, Gleb! As far as I can see from this profile, the only event that occurred there is trial_started. The status on the top left of the page is displayed depending on this last event (access level updated doesn't count).
Usually, on production you would see another event - trial_cancelled or auto_renew_off (the state would be the same - Trial cancelled or Auto-renew off).
I believe it does not work as expected, because there is a chance there is a "mismatch" of logic in your testing profile as it's lacking this "cancellation" (might be auto_renew_off or trial_cancelled) event.
Could you please try to "cancel" this trial first and see if that helps? Please note that this behaviour might happen only in testing.
Usually, prolonging access level through API works on production without any issues, but there were some cases in the past when it did not work on Sandbox.
The second option is you can make a revoke of the last access level that you granted and try to grant it again.
If nothing from above helps, you can try to create a new Sandbox user "from sctratch" and test all the behaviour once again.
Additionally, please configure RTDN in settings, it might help as well.
G
Gleb Ignatev
Hi Artem, thanks for the quick response! Here's the ID from the description: 5750f3dc-0916-47e0-8b54-21f68ecbd659.
Adapty Support
Hi Gleb, thank you for reporting this! Would you mind sharing id of the profile in question? It will not compromise privacy or anything, and we will only be able to use it on our side for investigation. Thanks!