How to verify which vender sold my android app? - android

I have developed an android app which is paid, now i want to sell my app. I have few vendors who will sell for me, I want to validate which vendor sold how many. How can i do it through my app.

To help you start with, I think you need this official documentation for you to understand well the concept.
The In-app Billing API makes it easier for you to integrate In-app
Billing into your applications. The In-app Billing API supports a
synchronous purchase flow, APIs to let you easily track ownership of
consumable goods, and local caching of in-app purchase data.
To manage in-app products:
Managed in-app products are items that have their ownership
information tracked and managed by Google Play. When a user purchases
a managed in-app item, Google Play Stores the purchase information for
each item on a per-user basis. This enables you to later query Google
Play at any time to restore the state of the items a specific user has
purchased. This information is persistent on the Google Play servers
even if the user uninstalls the application or if they change devices.
If you are using the In-app Billing API, you can also consume managed
items within your application. You would typically implement
consumption for items that can be purchased multiple times (such as
in-game currency, fuel, or magic spells). Once purchased, a managed
item cannot be purchased again until you consume the item, by sending
a consumption request to Google Play. To learn more about in-app
product consumption, see Consuming Items.

Related

Need clarity on implementing a subscription app

I've developed an Android app and need clarity on what is required to offer it, via Google Play Store, as a subscription app (i.e. offer use of the app for a monthly fee). For now, no in-app purchases or in-app subscriptions are planned; the only subscription is for use of the app itself. All of the documentation I've read about subscriptions from the Google Play Store seems only to discuss in-app subscriptions.
My questions:
1) Is an overall app subscription treated/processed the same as an in-app subscription (i.e. via the app)?
2) If not, what portions of the Google documentation/guides on subscriptions do I implement? Everything that isn't expressly mentioned as being for in-app subscriptions/purchases?
3) Do I need a back-end server to manage/track app subscription info, or can subscriptions at the app level be managed via Google Play Console?
4) Is there a guide/example/tutorial somewhere that clearly explains how to implement what seems like a basic solution, a subscription app with no in-app purchases?
Examples of what I found during research:
Create a subscription - Play Console Help indicates:
Create a subscription
Using Google Play Billing, you can offer in-app products that charge users for content or services on a recurring basis, known as subscriptions. Subscriptions can include items like a collection of apps, games, or other content for a recurring fee within your app on Google Play.
In Google Play Console, subscriptions are only mentioned (from what I can see) under Store presence->In App Products->Subscriptions
I reviewed other questions on SO related to subscriptions, but virtually all appear to be focused on in-app subscriptions. One exception was Implementing a Yearly Subscription. Per the answer from GNUzilla, I understand the need to create a payment profile in Play Console. The second part of GNUzilla's answer references the now deprecated AIDL interface, so I instead reviewed the guide page for its replacement, Use the Google Play Billing Library | Android Developers. However, this also appears focused on in-app subscriptions. For example,
Enable the purchase of an in-app product
...
To start a purchase request from your app, call the launchBillingFlow() method from the UI thread. Pass a reference to a BillingFlowParams object containing the relevant data to complete the purchase, such as the product ID (skuId) of the item and product type (SkuType.INAPP for a one-time product or SkuType.SUBS for a subscription).
Is an overall app subscription treated/processed the same as an in-app subscription (i.e. via the app)?
There is no such app subscription feature Google has implemented. It always will be in-app subscriptions. User will download the app free/paid and login/signup into the app then the developer will show the subscriptions plan based upon the business case.
If not, what portions of the Google documentation/guides on subscriptions do I implement? Everything that isn't expressly mentioned as being for in-app subscriptions/purchases?
In-App subscriptions. Check here https://developer.android.com/google/play/billing/billing_subscriptions
Do I need a back-end server to manage/track app subscription info, or can subscriptions at the app level be managed via Google Play Console?
Yes, you need the backend for managing the real-time notifications. If you don't want to have the backend then you will miss lots of scenarios like your app don't what is the current subscription status. It is also good from a security point of view to verify the purchase in the backend.
Is there a guide/example/tutorial somewhere that clearly explains how to implement what seems like a basic solution, a subscription app with no in-app purchases?
You can check google documentation here. In the future, I will also publish the blog regarding this.

Detect In-app Products after it was consumed

Using In-app Products, we can detect if user own a product by it's sku, if he is connected with same Google account as payment was made. But if we consume this in-app product, so it's not owned anymore, how can we know this user paid for this in-app product? As per their docs there is no way.
Only implementing own backend logic but the problem is that we have to implement auth to remember user's state (how many sku does he consume).
Yeah, when they are consumed, they are gone.
In this case you want to use non-consumable products for in app purchases. These remain to be coupled with the Google Account. With this, whenever we are retrieving the list of bought products of a user, the library will return the product if it was previously bought on that Google Account. Basically it is never consumed and remains coupled to the account.
By using these non-consumable products, we can easily 'restore' purchases for users when they have a new device for example. But non-consumable products are a one-time buy and are more used for 'unlocking' some content or features. As result, it cannot be used to see 'how many' times it was bought, as it's just a one-time buy.

How to verify user purchased premium version using in app product in android?

I have developed an app in which I want to give a premium version of an app with ad removal and some extra features in-app products.
So, my question is how to verify if a user had purchased already; Then, when a user opens the app, I know if I should give them a premium interface.
Here's the documentation overview for In App Billing, where it says:
Google Play tracks and manages the ownership information of managed products. When a user purchases a managed product, Google Play stores the purchase information for each product on a per-user basis. This enables you to later query Google Play at any time to restore the state of the products a specific user has purchased. This information is persistent on the Google Play servers even if the user uninstalls the application or if they change devices.
To provide premium content, you'll need to create a managed product that doesn't get consumed in the app when the user purchases it. In order to query the user's in-app purchases, send a getPurchases() request, that will return all the current un-consumed products owned by the user.
If you find the premium content in this response, you know the user has purchased it and can grant them the premium interface.
Google Play Billing AIDL is now deprecated and will be removed in a future release. To implement Google Play Billing features, use the Google Play Billing library and to get purchases details for all the items bought within your app use: queryPurchases(skuType).

Android InApp Billing v3 cancel consumption

I have working app that sells in-app products (InApp billing v3).
Recently I've made an update for this app and made a terrible mistake there: I consumed some of purchases I didn't want to consume.
I issued an update and users updated the app and then wrote me they have no purchased access. (As I found later, I consumed wrong items).
So I have some questions now:
Is there a way to restore consumed purchases or I should return payments to my users?
Is there a way to find out how many and which purchases were consumed?
If returning payments, is there a way to find out if user still has the product or is it consumed with out changing the app (through google services)?
Thanks.
According to what I have understood from your question, It seems like you want to purchase product only once.
What I wished to ask: is there a way to request information about consumed products like about owned products.
you can get response or it's information in any type(Managed Product, Unmanaged Product, Subscription) in the onActivityResult method() check my below link.
In-app billing-v3 error in activity result
but I would not prefer you to manage it customly as you told for one time purchase product(not consumable product). You should go with the Manage product.
Managed In-app Products:
Managed in-app products are items that have their ownership
information tracked and managed by Google Play. When a user purchases
a managed in-app item, Google Play stores the purchase information for
each item on a per-user basis. This enables you to later query Google
Play at any time to restore the state of the items a specific user has
purchased. This information is persistent on the Google Play servers
even if the user uninstalls the application or if they change devices.
for more information about product type
you can query any time you want and you will get the product information, and even you don't need to manage if user has already purchase this product or not.
Is there a way to restore cnsumed purchases or I should return payments to my users?
Better option is you should give the payments back to the user and for the next time check the whole app once using dummy product "android.test.purchased" and update your app.
Is there a wat to find out how many and which purchases were consumed?
You have to check in the Google wallet because all transaction should be handle by the it, check if it gives you product type or not. Using your google developer console credential you can signed into google wallet.
If returning payments is there a way to find out if user stil has the product or is it consumed with out changing the app (through google services)?
as per above answer you have to check in google wallet, according to my knowledge they are provide us all of information about product type with user detail.
Let me know if I have not properly understood your question.
Hope it will solve your problem.

In-app purchases: how and where are purchases stored? (Android, iOS)

I am aware that apple provides a store for in-app purchases and any user can pull that data from different devices. Is there such a provision for Android apps (Google Market or Amazon App Store)? If so, how do we use this? I've not been able to find any info abt this online. I'm afraid I might have to store purchase information in my own DB. Would that be okay? Anything I need to be aware of?
Thanks!
The Google Market provides a RESTORE_TRANSACTIONS request which returns to you a list of all the (managed) purchases made by the user. You can issue this request on a new install to get the user's list of purchases.
It is very similar to restoring purchases for the iOS in-app purchases.
It only works for managed purchases which means purchases that the user owns forever.
You will still need some kind of local list of purchases as Google recommends you only do RESTORE_TRANSACTIONS on new installs.

Categories

Resources