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

[ANDROID] IntroPrice is null in getOffering() #690

Open
basemanabulsi opened this issue Jul 16, 2023 · 6 comments
Open

[ANDROID] IntroPrice is null in getOffering() #690

basemanabulsi opened this issue Jul 16, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@basemanabulsi
Copy link

basemanabulsi commented Jul 16, 2023


I am trying to use revenuecat with react native 0.69.5 on Android, the intro price is defined correctly on the store and its active.
But the offer is received from the offers, offer identifier has the same ID as the offer ID.
The object that has been returned from revenuecat has offerIdentifier correctly but the intoPrice is null.
We have defined the offer as Developer determined which I have to determine if the user is eligible of not.
Can you help in this?

I found something look like the issue I am facing in flutter SDK RevenueCat/purchases-hybrid-common#446 and it has been fixed before 3 days.

Based on the documentation I can determine anytime I want to set the offer but its not working.

My device:

  1. Huawei Y9s - STK-L21
  2. Has play store
  3. EMUI 12.0.0
  4. Google play system update 2023-05-01 Q
  5. Play Store Version: 36.5.21-29

Packages:
"react-native": "0.69.5",
"react-native-purchases": "^6.2.3",

This is the object I am getting:
I have hided the title, price and identifier for confidentiality

{
   "identifier":"$rc_monthly",
   "offeringIdentifier":"h123",
   "packageType":"MONTHLY",
   "product":{
      "currencyCode":"JOD",
      "defaultOption":{
         "billingPeriod":[
            "Object"
         ],
         "freePhase":null,
         "fullPricePhase":[
            "Object"
         ],
         "id":"p1m",
         "introPhase":null,
         "isBasePlan":true,
         "isPrepaid":false,
         "presentedOfferingIdentifier":"h123",
         "pricingPhases":[
            "Array"
         ],
         "productId":"XXX", // I hided it
         "storeProductId":"XXX:p1m", // I hided it
         "tags":[
            "Array"
         ]
      },
      "description":"One Month Subscription",
      "discounts":null,
      "identifier":"XXX:p1m", // I hided it
      "introPrice":null,
      "presentedOfferingIdentifier":"h123",
      "price": xxx, // I hided it
      "priceString":"JOD xxx", // I hided it
      "productCategory":"SUBSCRIPTION",
      "productType":"AUTO_RENEWABLE_SUBSCRIPTION",
      "subscriptionOptions":[
         [
            "Object"
         ],
         [
            "Object"
         ]
      ],
      "subscriptionPeriod":"P1M",
      "title":"..." // I hided it
   }
}

Can you help in this? please

@basemanabulsi basemanabulsi added the bug Something isn't working label Jul 16, 2023
@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!

@MarkVillacampa
Copy link
Member

Hello @basemanabulsi

Let's discard a couple things first:

  • Was this a very recent change you made adding the introPrice? Sometimes PlayStore changes can take a while to be reflected on the app.
  • I see you have two products in subscriptionOptions, which I guess will be the base plan and the offer. Can you check if the introPrice is reflected there?

If none of these work, it would be helpful to see a screenshot of your PlayStore product configuration, including the pricing phases (of course feel free to redact as much information as needed for your privacy, I personally use Skitch for that)

@basemanabulsi
Copy link
Author

Hi Mark,
Thank you for your response, regarding the subscriptionOptions its correct and filled correctly with the 2 phases while the intro price is not correct and its not taken

@MarkVillacampa
Copy link
Member

defaultOption should contain the offer with the longest free trial period or the cheapest introductory offer, or the base plan if there is no offer.

Can you confirm if the product identifier for defaultOption is the one for your offer or the one for your baseplan? If it's the base plan, there is either something wrong in the Play Store configuration or the SDK 😄

Additionally, can you post the json for both subscriptionOptions?

Thank you!

@AronBe
Copy link

AronBe commented Jul 24, 2023

Facing the same issue, have you managed to resolve it @MarkVillacampa ?

Edit: I see it shows only if no previous purchases were made by associated Google Play account, which is probably correct handling. Would be a nice to have a record of "used" offers / free trials as a reference, because as it currently is, one has to basically go and use a new Google account to repeat the flow.

@MarkVillacampa
Copy link
Member

That's correct @AronBe. Billing Library only returns products the current user is eligible to use, so it won't return an intro offer that the user has already enjoyed. This is a limitation of the Play Store and there is currently no way to reset the intro eligibility.

For testing purposes, you can use an offer with Developer Eligibility, which will always be available.

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

4 participants