-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify Base Plan ID when making Subscription Purchase - Android Billing #651
Comments
I had the same question myself, maybe @jamesmontemagno can shed some light. The way I understand how this API works is actually by the Product ID. I don't think it looks at the base_plan_id. So in a sense, I have simply created multiple subscriptions with Product ID's associated to the In App Subscription. IOS works by creating a Subscription Group, which I think would be the equivalent of the Product ID here. But the behavior in Android seems to be slightly different. |
This is the approach I have taken so far as well, but it means I have to manually handle proration between monthly, quarterly and yearly plans. It seems like I can set the |
I tried setting the |
the offer token is if you have an offer available for a subscription.... for example 5 day free trial. I am pretty sure you query your subscription as normal with an id and purchase that id.... i don't use base plans yet and their documentation is confusing. https://developer.android.com/google/play/billing/integrate#launch i am pretty sure when you query your base plan it will return back to you a list of all of offers under it. Having a hard time finding a kotlin flow from querying to purchasing |
@jamesmontemagno Thank you for the reply! I also tried finding anything in the android BillingClient docs on specifying the |
@DanCodes1414 - how do you handle upgrades/downgrades with each plan as a completely distinct plan? I've got everything working smoothly with iOS, but when I test trying to upgrade/downgrade Android plans, it doesn't seem to cancel the previous plan. Could be I'm doing something wrong for sure. I just started down the path of trying the base plans, and came across this thread and learned that isn't going to work either. |
@jamesmontemagno @DanCodes1414 I FIGURED IT OUT! Ok, like seriously... damn documentation does nothing for you. But I'm a stubborn SOB and I plinked around until I figured something out. It is a HUGE pita, seriously. But here goes: If you use the The upgrade method doesn't currently show it (have no idea if it supports it?), so you can't upgrade that way in the current code form. @jamesmontemagno - does it allow it under the hood but not currently exposed? |
When making a purchase, there is only the option to provide the
Subscription ID
, and not theBase Plan ID
.var purchase = await CrossInAppBilling.Current.PurchaseAsync(request.PlanId, ItemType.Subscription);
The text was updated successfully, but these errors were encountered: