Question

Flutter StoreProduct discounts vs introductoryPrice

  • 23 July 2023
  • 3 replies
  • 99 views

Badge +3

Hey,
I am currently working on implementing Offers and Discounts into my paywall for flutter, and I'd appreciate assistance with a couple of issues I've encountered.

Firstly, everything appears to be working as expected for the AppStore. When I inspect the StoreProduct object, I can see that both the introductoryPrice and discounts fields correctly reflect my setup on AppStore Connect. However, the situation is different for Android/GooglePlay. It seems that only the introductoryPrice is being set, and the discounts field remains empty. Can you confirm if my assumption is correct, and Android never populates the discounts field since the PlayStore does not offer that capability?

Secondly, I am a bit confused about how to handle purchases of a Package using discounts and intro prices. On iOS, I successfully used the method Purchases.purchaseDiscountedPackage to buy a package using the StoreProductDiscount. However, I'm unsure how to make a purchase at the introductoryPrice. Could you please guide me on how to do this for both iOS and Android?

Regarding Android, as I mentioned earlier, the introductoryPrice is not being automatically applied despite what the documentation suggests. Instead, the Playstore checkout displays the normal price, and it shows that I am not eligible for the introductory price. How can I ensure that a user is eligible for the IntroPrice so that I can display it correctly?

Lastly, for iOS, it appears that I can use the method Purchases.checkTrialOrIntroductoryPriceEligibility to determine a user's eligibility for the Introductory Price. However, I have not found a similar method for Android. Could you clarify if there is any alternative method to achieve this on the Android platform?

 


 


3 replies

Badge +3

Seems like I was still on the old Flutter SDK. 
I will look into the new version and also the migration guide since quickly skimming over the text seems to already answer a lot of my questions.

Userlevel 4
Badge +6

Hey @patrick-s ,

Let us know if there’s any questions you find in your migration that don’t seem to be answered in the guide!

Badge +3

Hey @kaitlin,
so far I only noticed one thing that was not mentioned in the migration guide.
For changing/upgrading a subscription’s base plan on android the migration guide does not mention that I had to change the GoogleProductChangeInfo.oldProductIdentifier. On the old setup I was using multiple subscripts of different length. With the new SDK I merged the subscripts into one with multiple base plans. Therefor, I needed to set the `GoogleProductChangeInfo.oldProductIdentifier` field to the identifier of the Subscription without the id of the Baseplan that RevenueCat merges into a single productIdentifier.
E.g.

`my_sub:base_plan` did not work if I wanted to change the base plan
`my_sub` did work if I wanted to change to another base plan for `my_sub`.

I will keep you guys updated if I find something else.
 

Reply