Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promotional subscription overrides normal subscription in customerInfo.entitlements #844

Open
5 tasks done
Bi0max opened this issue Jan 16, 2024 · 7 comments
Open
5 tasks done
Labels
bug Something isn't working

Comments

@Bi0max
Copy link

Bi0max commented Jan 16, 2024

Hi all,

When I have both normal and promotional subscriptions active (and they have the same entitlement), I naturally see only one of them (only promotional) in the customerInfo.entitlements, since it is a dictionary with unique keys. But there is no way that I can get information about both subscriptions, because there is no customerInfo.subscriptions field.

And for Play Store it's important to know some information about a normal subscription, since it influences the googleProductChangeInfo for purchasePackage method.

The CustomerInfo interface (https://revenuecat.github.io/react-native-purchases-docs/7.15.0/interfaces/CustomerInfo.html).

  1. Environment
    1. Platform:Android
    2. SDK version: 7.6.0
    3. OS version: 14
    4. Xcode/Android Studio version: using expo
    5. React Native version: 0.72.5
    6. SDK installation (CocoaPods + version or manual): expo
    7. How widespread is the issue. Percentage of devices affected: Testing on my own device before pushing to production at the moment
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Additional context
Add any other context about the problem here.

@Bi0max Bi0max added the bug Something isn't working label Jan 16, 2024
@RCGitBot
Copy link
Contributor

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@NachoSoto
Copy link
Contributor

Great question. It is true that entitlements cannot disambiguate this because of their format. You mentioned that "there is no customerInfo.subscriptions field". Would activeSubscriptions work for you?

@Bi0max
Copy link
Author

Bi0max commented Jan 17, 2024

Hi @NachoSoto , I use activeSubscriptions for now. But this array has only identifiers. I need to get a periodType from the subscription.

@NachoSoto
Copy link
Contributor

NachoSoto commented Jan 17, 2024

With those you can fetch the product and look at their subscriptionPeriod. Would that work?

@Bi0max
Copy link
Author

Bi0max commented Jan 18, 2024

With those you can fetch the product and look at their subscriptionPeriod. Would that work?

I meant a periodType, which is TRIAL, NORMAL or INTRO. It's not an attribute of the product. It's an attribute of a specific user's subscription

I need this field to make a correct change of subscription for Play Store. I need to know, whether the current subscription is in TRIAL at the moment or not.

@NachoSoto
Copy link
Contributor

Sorry for the confusion, I see what you were saying now. This is indeed a limitation because that information is only available in the entitlement, and there can only be one entitlement active with an identifier. Is it not giving you the expected type?

@Bi0max
Copy link
Author

Bi0max commented Jan 19, 2024

Hi @NachoSoto , no, because entitlement shows me the PROMO subscription. PROMO subscription overrides the one from the Play Store, if they have the same entitlement. And PROMO subscription is always periodType=NORMAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants