1
  • I am using version 1.0.6 of in_app_purchase.
  • Set up a subscription with id base_mobile in-play console with monthly billing, 14-day free trial
  • The app is published to internal testing in-play console

I am able to fetch the products using final ProductDetailsResponse response = await iapConnection.queryProductDetails(_ids);

The main problem is not being able to test the free trial. On trying to buy a subscription as a non-consumable using the following code:

await iapConnection.buyNonConsumable(purchaseParam: purchaseParam);

pops up the following dialog:

enter image description here

I am not able to opt-in for the free trial. No option is shown. Also, the subscription is not automatically renewable. According to my understanding, subscriptions should be renewable as per the interval of the billing period.

I even tried out installing the app from another play account which is not a licensed tester. It's the same issue, the amount was deducted immediately without the possibility of a free trial. The subscription also was not cancellable in the play store.

Do have any of my setup wrong?

Rahul
  • 3,293
  • 2
  • 31
  • 43
boomboxboy
  • 2,384
  • 5
  • 21
  • 33

2 Answers2

0

There are a number of steps to implement this correctly and I am unsure about your other configuration or code. Instead, I would refer you to this link which shows step by step the items you need to do to get a flutter in-app subscription working in Android.

Foghorn
  • 2,238
  • 2
  • 13
  • 35
0

Using static responses sounds easy enough, right? You just use one on the following product IDs during a purchase operation:

android.test.purchased
android.test.canceled
android.test.refunded
android.test.item_unavailable

and the Play Store will reply accordingly. The code looks roughly like this:

Change it ids like this

 ProductDetailsResponse response = await iapConnection.queryProductDetails("android.test.purchased");
Sanjay Hadiya
  • 864
  • 9
  • 21
  • I do the query for my products with the ids registered in play console. The issue is not with the product showing up. The subscription is shown not renewable and 1-tap buy instead of 'subscribe' – boomboxboy Jul 09 '21 at 12:27