I am using in-app version 3 in my app. I want to purchase an already owned item from play store. But I saw that managed products can be purchased only once per user account and in Version 3, all in-app products are managed. What should I do?
You need to consume the in-app product within your app by sending a consumePurchase call. Afterwards the item can be purchased again. See https://developer.android.com/google/play/billing/api.html#consume for details.
Related
I released beta version of my app to playstore and I have implemented In-App purchases in my app. When I purchase the item for first time it is working fine and try to purchase again it is showing an error response as:
In-app billing error: Unable to buy item, Error response: 7:Item Already Owned.
I created a sample project and published to playstore with In-App purchase implementation. For published app the item purchasing working as expected for multiple times. But in Beta version app I'am unable to purchase an item for the second time. Its not even initiating the process of purchasing.
Why I'am unable to purchase an item for the second time in Beta version app?
because the item is non consumable in the google play console, this means that you can only purchase the item one item and after that you can not. if you want to enable the user to purchase the item more than one time you have to make the item on google play console as "consumable" then you will be able to purchase it as you want.
https://developer.android.com/google/play/billing/api.html
https://developer.android.com/google/play/billing/billing_admin.html
There are two types of products subscriptions and managed products. Managed products can be consumed. You must send a consumption request (consumePurchase call) to Google Play before purchase an item for the second time. Check documentation.
I got my current app in test with some items to testpurchase. And I´ve done that now but I need to do further testing on those items. Is there a way to simply "restore" those purchases so that I dont get that error "You already own this item" ?
There is a way:
Once an in-app product is purchased, it is considered to be "owned".
In-app products in the "owned" state cannot be purchased from Google
Play. You must send a consumption request for the "owned" in-app
product before Google Play makes it available for purchase again.
Consuming the in-app product reverts it to the "unowned" state, and
discards the previous purchase data.
I have a app in which if users selects upgrade your app from menu then i have to do inapp billing to upgrade app and then everything inside app becomes free for one year. And after one year it should come back to normal way.
I have created merchant account and done all setup for implementing Google inapp biling.
Now i wanted to add inapp products but i am not sure which one to select, Managed products or unmanaged products or subscription.
Managed products is aimed at one time downloads then you 'own that object'.
UnManaged products is for multiple downloads of the same thing to 'top something up'.
All subscriptions are auto-renewing, for every app and game and every type of subscription product. After the transaction, Google Play manages recurring billing and keeps users informed of new charges, sending them an email with each renewal. At any time, users can visit My Apps in the Play Store app to view their subscriptions and cancel any subscription as needed.
So in this subscriptions product it does this renewing thing but i wanted is make app free for one year only and after 1 year if user wants to upgrade then he again upgrades through the app.
Which product type should i choose for upgrading app.
You should use managed products. This product will be synced between all devices and preserved by Google Play Services until you consume it. The main point is not to consume the item so it will be available forever once purchased.
Of course you can utilize unmanaged products the same way but it's rather deprecated thing in in-app billing.
I am new to in app purchase, i am using v3 api, my question is that if i purchase an item from store after that i uninstall the app from device, than i install app again from store, that time i want the list of Already Purchased items from play store, means that i want restore the purchased items list, thanks.
i refer http://developer.android.com/google/play/billing/billing_reference.html#getPurchases
You can restore your transaction using the getPurchases() API
Check if this helps.
I'm starting with In App Billing and I would like to sell some magazines in my app. If one user buy one magazine he can read it always. I read about consumable and non-consumable in app billing but I didn't understand how can I make a non-consumable item and how can I manage it. I have to create a consumable item in google developer console and than specify in my app with a variable that the item is non-consumable?
Thank you in advance
First, The In-app Billing Version 3 service only supports managed in-app products so make sure that you specify that the purchase type is 'Managed' when you add new items to your product list in the Developer Console.
In In-app Billing Version 3 API once an item is purchased, it is considered to be "owned" and cannot be purchased again from Google Play. So I think we can say that per default items are non-consumable.
If you want to make this item consumable you have to call the consume function just after the purchase. Calling the consume function will "free" your item and make it "available" again. (Your user will be able to purchase it as many time as he wants)
mHelper.consumeAsync(purchase, mConsumeFinishedListener);
If you don't call the consume function, your item will never be consumed and will act like a non-consumable item.
Refering the developer site for the same, would be also helpful.
http://developer.android.com/google/play/billing/api.html