Skip to content
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

Android: How to get purchased base plan from GetPurchasesAsync? #632

Open
MelissaW990 opened this issue Oct 2, 2024 · 5 comments
Open

Comments

@MelissaW990
Copy link

In the scenario where a user needs to restore their subscription and the subscription has multiple base plans for different levels of functionality in the app, how can I identify what base plan the user has subscribed to?

Calling the 'GetPurchasesAsync' method returns the subscription details, but nowhere in this information (that I can identify) is the Base Plan ID or token that is passed to the 'PurchaseAsync' method.

Screenshot 2024-10-02 at 15 29 02

Thanks, M

@pulmuone
Copy link

pulmuone commented Oct 2, 2024

image

@MelissaW990
Copy link
Author

image

But these are five individual subscriptions yes? How are you handling the user upgrading/downgrading?

@pulmuone
Copy link

pulmuone commented Oct 3, 2024

@pulmuone
Copy link

pulmuone commented Oct 3, 2024

image

But these are five individual subscriptions yes? How are you handling the user upgrading/downgrading?

https://github.com/dmariogatto/azure-functions-iap-verify

@fooberichu150
Copy link

fooberichu150 commented Dec 21, 2024

@MelissaW990 - I'm not so sure you can. But... if you use the Google.Apis.AndroidPublisher.v3 SubscriptionsV2 endpoint, you can drill into the SubscriptionPurchaseMetadata response object and pull it from the LineItems. Specifically, LineItem has an OfferDetails object on the response which has the basePlanId.

edit the one thing about this endpoint that I find extremely aggravating is that it only ever returns the "latest" details for that particular purchaseToken. There is no way to get a full listing of transactions for a particular user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants