RevenueCat / RevenueCat/react-native-purchases

Promotional subscription overrides normal subscription in `customerInfo.entitlements`

Open
#844 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.2k
Forks
117
Avg merge
14h 40m
Merged PRs (30d)
40

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CustomerInfo interface documentation and the customerInfo.entitlements and purchasePackage flows described in the issue. Determine how both normal and promotional subscriptions should be represented while preserving the Google product change information; the issue is complete when callers can access the needed normal subscription data without losing the promotional entitlement.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, react-native, typescript
Domain
api, mobile, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.