play-billing-samples icon indicating copy to clipboard operation
play-billing-samples copied to clipboard

Bug: inconsistent PricingPhases.getPricingPhaseList results, as some show a single item, and some show multiple

Open AndroidDeveloperLB opened this issue 9 months ago • 9 comments

Not sure if it's ok to report bugs here about Google IAP, but I can't find anywhere else...

For the app I work on, it has subscriptions with free-trial.

Inside the app, it was required to add a simple sentence of "Start %1$d day free trial then %2$s / year" . For example "Start 30 day free trial then $30 / year".

As I've always got a single item there for PricingPhases.getPricingPhaseList , I just used it. However, for some users, they get multiple items there, and the first one shows it's free, so some users see this:

"Start 30 day free trial then free / year".

I've seen this post about finding information about the free trial: https://github.com/android/play-billing-samples/issues/540

And people say there that it's supposed to be 2 items, but here I see 2 different behaviors, where for most users it's just 1 item.

How could it be ? Perhaps it's because I've had the subscription used in the past, that it remembers me and offers me only one phase? If so, how can I reset it to see how it's supposed to be?

This is how it's set up on the Play Console:

settings.zip

AndroidDeveloperLB avatar Sep 13 '23 07:09 AndroidDeveloperLB

I believe it depends on how you have setup the offer on Play, if you have setup the offer as a one time thing then once user subscribes to the offer they will no longer get it in the response from the billing lib i.e it knows the user no longer qualifies for the offer and doesn't include it.

This means it is best to write your App code like any of the offers could or could not be there, you can use the tags probably to look for the offer by tag instead of expecting a specific number of offers to be returned.

There is no way to reset this behaviour that I have found other than using a different Play account on the device.

matale avatar Sep 14 '23 18:09 matale

@matale I'm not talking about multiple offers. I'm talking about a single subscription that has a trial period.

The issue is that it's set up in some way, but for some users the API returns a single item and for some it returns 2 items for the pricing-phases.

I've updated the first post of this thread with how it's set up.

AndroidDeveloperLB avatar Sep 14 '23 18:09 AndroidDeveloperLB

I think that is the correct behaviour if the user has already consumed the free trial, check which item the users that are only getting 1 are getting. I might have used the wrong word offer instead of phase, I haven't touched it in a while.

matale avatar Sep 20 '23 20:09 matale

@matale Is it documented anywhere? Also, how can I reset it as a developer, for myself, so that I could see it as 2 items again?

AndroidDeveloperLB avatar Sep 20 '23 20:09 AndroidDeveloperLB

Cant be reset from my experience need a new play account as I mentioned, not sure its documented.

matale avatar Sep 30 '23 07:09 matale

@matale This is bad for testing and for development.

AndroidDeveloperLB avatar Sep 30 '23 07:09 AndroidDeveloperLB

ok?

matale avatar Sep 30 '23 07:09 matale

@matale I don't understand. Is there any way to report this to Google, so that they will offer it?

AndroidDeveloperLB avatar Sep 30 '23 07:09 AndroidDeveloperLB

@matale Not ok. This needs to be documented, and it needs to have an ability to reset it for testing and development. Where do you see that it's ok?

AndroidDeveloperLB avatar Oct 04 '23 23:10 AndroidDeveloperLB