Skip to main content
Solved

purchaseDiscountedPackage in real ios device(Flutter)

  • 12 January 2022
  • 1 reply
  • 207 views

Forum|alt.badge.img+2

I am using  monthly and annual package in my app. They have 3day trial option.I used these method:

 

var paymentDiscount = await Purchases.getPaymentDiscount(
    choosedoffer!.product, choosedoffer!.product.discounts![0]);

purchaseinfo = await Purchases.purchaseDiscountedPackage(
    choosedoffer!, paymentDiscount);

to make a purchase.It is working while i am testing but when i uploaded to the app store from other’s people’s Iphone i realized that it isn’t working.Payment screen do not come to the screen but in test mode it is coming.How can i solve this problem?

Best answer by sundeep

This question was handled through our ticketing system, but posting the response here as well for visibility: 

Try to check whether you were testing with users who had never subscribed before. `getPaymentDiscount()` will only return a valid result for users that are eligible for the promotional offer, so they'd have to have an active or expired subscription already. It won't work for new users who haven't bought a subscription before.

For more context, you can read about eligibility for promotional offers from Apple's docs here: https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/subscriptions_and_offers/implementing_promotional_offers_in_your_app as well as in RevenueCat's docs here: https://docs.revenuecat.com/docs/ios-subscription-offers#2-show-the-subscription-offer-to-desired-users 

View original
Did this post help you find an answer to your question?

1 reply

sundeep
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 138 replies
  • Answer
  • January 21, 2022

This question was handled through our ticketing system, but posting the response here as well for visibility: 

Try to check whether you were testing with users who had never subscribed before. `getPaymentDiscount()` will only return a valid result for users that are eligible for the promotional offer, so they'd have to have an active or expired subscription already. It won't work for new users who haven't bought a subscription before.

For more context, you can read about eligibility for promotional offers from Apple's docs here: https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/subscriptions_and_offers/implementing_promotional_offers_in_your_app as well as in RevenueCat's docs here: https://docs.revenuecat.com/docs/ios-subscription-offers#2-show-the-subscription-offer-to-desired-users 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings