Skip to main content
Question

Whats instead await Purchases.purchaseProduct() in Flutter?

  • September 22, 2023
  • 2 replies
  • 761 views

Forum|alt.badge.img+3

Hey,

I see that Purchases.purchaseProduct(); is Deprecated and it suggests to use purchaseStoreProduct instead. but purchaseStoreProduct doesn’t accept string like purchaseProduct so what should be instead if I want to purchase a IAP consumable/non-consumable product and not subscription.

This post has been closed for comments

2 replies

Forum|alt.badge.img+2
  • Helper
  • September 26, 2023

Please check my answer to similar question here:
 

 


Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • September 26, 2023

Hey @alex0401 !

 

More information on this method can be found here: https://pub.dev/documentation/purchases_flutter/latest/purchases_flutter/Purchases/purchaseStoreProduct.html

 

You will want to pass in a StoreProduct for the first parameter of this method, which will allow you to trigger the purchase flow!

 

Let me know if that helps!