Question

Google play subscription offer with Flutter

  • 20 May 2023
  • 1 reply
  • 16 views

Userlevel 1
Badge +1

I created a subscription offer that the developer decides when to apply it. In the docs on how to use it there is this Kotlin example PurchaseWith(offer) and then you can do it like that. I am looking in the Flutter SDK and I can’t find a way to do it. purchaseDiscountedPackage() and other functions say “iOS only”. 

I want to apply a discount named x to this line:

Purchases.purchasePackage(offerings!.current!.monthly!);


1 reply

Badge +2

Hi aris,

In our (beta) version of the SDK with Billing Client 5, we do have a google specific method called purchaseSubscriptionOption. You can pass the specific option (offer) that you want to buy.

Use purchaseStoreProduct and pass the corresponding store product and it will use the defaultOption (offer).

Reply