Questions tagged [android-billing]
Android In-app Billing is a Google Play service that lets you sell digital content from inside your applications.
425
questions
78votes
8answers
25kviews
Why is it important to set the developer payload with in-app billing?
I'm using version 3 of the in-app billing API. I have a single, managed, non-consumable item. I have not released this feature in my app yet, so I want to decide on the purchase payload contents ...
70votes
19answers
31kviews
Android in-app billing: Can't start async operation because another async operation (is in progress)
I am using the IabHelper utility classes, as recommended by Google's tutorial, and I'm being hit hard by this error. Apparently IabHelper can not run multiple async operations at the same time. I even ...
70votes
7answers
9kviews
In-app purchases with multiple accounts
I am facing a problem with in app purchases/subscriptions:
If there are multiple accounts on the device, I can't get the purchases, which were made with the second account.
This can sometimes be ...
55votes
11answers
24kviews
Calling startIntentSenderForResult from Fragment (Android Billing v3)
The new Android Billing v3 documentation and helper code uses startIntentSenderForResult() when launching a purchase flow. I want to start a purchase flow (and receive the result) from a Fragment.
...
36votes
6answers
27kviews
Android In App Billing: Can't start launchPurchaseFlow because launchPurchaseFlow is in progress
I'm implementing In App Billing for the first time and I'm testing my first purchases using the static SKU ids.
It worked very well the first time. I called mHelper.launchPurchaseFlow(...) and ...
31votes
1answer
21kviews
How to remove Subscription from product list in developer console and what will be its effect on the old subscribed users?
I want to remove the existing subscription product from product list.
How would I be able to perform so as I didn't found any option on my developer console to delete the subscriptions ?
Also if in ...
30votes
3answers
19kviews
Google Play In-app Billing API version is less than 3
I just started beta testing the 2.0 update to the billing library for the Play Store and a lot of my users are getting this error Google Play In-app Billing API version is less than 3.
Is this just ...
30votes
2answers
727views
Account information associated with an application installation
It's a widely sought issue among those who implement In-app billing in Android, that how multiple accounts are dealt with. If a user has multiple accounts configured, which one will be used for in-app ...
23votes
4answers
28kviews
android in app billing purchase verification failed
i' having trouble implementing in app billing in my android app.
i'm getting a purchase signature verification failed.
In a first time i tough it was the base64 key but i checked it many times and i'm ...
23votes
4answers
9kviews
Android billing exception
I am testing my billing and I got this exception:
java.lang.IllegalStateException: Can't start async operation (launchPurchaseFlow) because another async operation(launchPurchaseFlow) is in progress.
...
23votes
2answers
21kviews
What should be the developer payload in android in-app billing v3 api?
I am implementing in-app billing in my app to unlock premium features.
The in-app billing sets up correctly. Everything seems fine except the 'developer payload' thing.
The sample app says
/*
*...
21votes
9answers
10kviews
Android Play Billing Library: onSkuDetailsResponse responseCode is 0, but the size of skuDetailsList is also 0
I'm now using the new Play Billing Library
Basically, I followed the documentation to query available items to purchase
SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
...
19votes
2answers
5kviews
In-app purchase: get the name or ID of the Google Play account that's requesting a purchase
I want to get a name / ID of the user making a purchase. I would like to do without AccountManager if possible, as its use requires an extra permission. Even with AccountManager I don't see a way to ...
16votes
3answers
2kviews
Why Android BillingClient v2 slow credit card test never cancels?
I am implementing the new BillingClient library (v2.1.0) for a non-consumable in-app purchase.
I am testing pending transactions with a test user. It works fine with "Credit card approves after a few ...
16votes
3answers
8kviews
BillingClient always returns SERVICE_DISCONNECTED
So I have a billing client which I instantiate with
billingClient = BillingClient.newBuilder(this).setListener(this).build();
I then call
billingClient.startConnection(new ...
16votes
2answers
2kviews
How to detect refund with google billingclient library
I was wondering how to detect a refund, or any type of cancelation of an in-app purchase(not a subscription and not a consumable).
I'm currently making my test and when I refund a test in google like ...
15votes
2answers
11kviews
In App billing not working after update - Google Store
I have implemented In-App billing in my app - and very recently google has updated it,previously i was testing the in-app billing with "android.test.purchased" and it was working fine (Buy full ...
13votes
2answers
12kviews
Token that identify the user
I'm developing an android application and I would like some functionality of the application is not free.
I have thought to use in-app Billing Version 3 API, so I have defined an "In-App Product" in ...
13votes
0answers
834views
Play Billing Library - V3 vs Async vs Sync - different results
I have users that have purchased items (SkuType.INAPP) from my application.
In the previously recommended implementation of in app billing the IabHelper.QueryInventoryFinishedListener would return an ...
13votes
1answer
1kviews
Android billing library error
everyone.
I just started with in app purchase in my application.
It's something new for me.
Now I've seen some examples on the net, I found that one project on github was full of errors before I ...
12votes
2answers
4kviews
Android In-App Billing: Refunded in-app purchases not cancelled
I'm having a trouble with testing my in-app billing.
(using Google Play In-app Billing Version 3 API)
Problem:
Refunded in-app purchases are still present in the purchase list, which is provided by ...
11votes
6answers
6kviews
Google in app purchasing get products list
I found the following code from here to get products list from google play store
ArrayList skuList = new ArrayList();
skuList.add("premiumUpgrade");
skuList.add("gas");
Bundle querySkus = new Bundle()...
11votes
1answer
2kviews
Refund customer in-app purchase but BillingClient still indicate user has purchased?
I'm using the following BillingClient.
implementation 'com.android.billingclient:billing:1.2.2'
Although I have issued refund as bellow
But I'm still getting the following respond from ...
10votes
2answers
10kviews
Android IABv3 getSkuDetails not returning Sku Details
I am currently battling with Android Iab v3.
I have previously been using the IabHelper class from Google to display available products with success. However, today it is no longer returning me ...
9votes
3answers
3kviews
Google Play Billing (testing mode): why my purchase is automatically canceled
I followed all the best practices from Google Developer Doc: https://developer.android.com/google/play/billing/billing_library_overview
I push my App in Beta test mode. All works perfectly, except at ...
9votes
1answer
28kviews
Android "The payment method has been declined" for every payment method
I'm trying to implement in-app billing using Android, but I'm getting a weird error and I can't find anyone online with a similar problem.
I've done the following:
Uploaded APK with billing ...
9votes
3answers
4kviews
Android crash reports are not showing up in Google play console's ANRs & Crashes report
I'm currently testing Google play's billing library for in-app subscriptions on my android app. I've created the subscriptions and have released my app to the internal test track. However, when I try ...
9votes
3answers
2kviews
BillingClient.BillingClientStateListener.onBillingSetupFinished is called multiple times
I tried to write a wrapper for BillingClient v.2.2.0 with Kotlin Coroutines:
package com.cantalk.photopose.billing
import android.app.Activity
import android.content.Context
import com.android....
8votes
4answers
7kviews
Implement Google Play Billing Library version 2
Google published a brand new version to handle the payments in Android but after searching quite a while I cannot find a single example or tutorial from someone who succeeded implementing it.
The ...
8votes
4answers
6kviews
Android billing - in the file Security.java should the base64EncodedPublicKey be the encoded value?
Should I paste the actual public key of my app right into the value of this variable?
Or should I encode it and then whatever the encoded string is, I'd make that string into the value of this ...
8votes
3answers
2kviews
Android billing exception about a trailing character
I get this exception from my crash reports:
java.lang.RuntimeException: Unable to start service com.problemio.BillingService@4132b868 with Intent { act=com.android.vending.billing....
8votes
2answers
3kviews
How to properly update Android BillingFlowParams methods deprecated
I have
BillingFlowParams purchaseParams = BillingFlowParams.newBuilder().setSku(skuId).setType(billingType).setOldSkus(oldSkus).build();
but now
setSku
setType
setOldSkus
are all deprecated.
I ...
8votes
1answer
1kviews
Adding in-app purchase to existing published application and testing it without publishing
I'm trying to add in-app purchase for my existing published app that didn't previously have billing permission. I've uploaded an updated APK with billing permission, but didn't activate it since I don'...
8votes
0answers
252views
can't disable re-subscription for android subscription on Play Store
TL;DR
Why can our users re-subscribe on Play Store, despite opting-out of this on Google Play console?
we are implementing a subscription on our Android app. we have selected the "resubscribe&...
8votes
0answers
1kviews
Verifying in-app-purchases
The sample app that the Google Developers guide refers to has a method called verifyValidSignature() that looks like this in the BillingManager class:
/**
* Verifies that the purchase was signed ...
8votes
0answers
187views
Is implementing in-app-purchases for Android really this complex?
I'm about to implement In App Purchases (IAP) for a premium-upgrade feature in an app I'm developing, and I've read the official developer guides. There, they mention that
You can use the Play ...
8votes
1answer
271views
Make one IAP valid for different applications
Until now, I distributed my app on the Play Store with an in-app purchase to disable ads.
I am redesigning the whole app and I'd like to split it into two applications: one for mobile devices (like ...
8votes
2answers
903views
Identifying refunded Play Store downloads
Play Store is now automatically approving refunds if they happen with 2 hours after the purchase. I have an Android App where people can create and control a VPS gaming host from the app. That is, ...
8votes
0answers
2kviews
IabHelper Android bug (NullPointerException) launchPurchaseFlow?
I am using the last version files of in-app billing from Google. Today I got an error in my phone when I download the app (I tried to repeat the steps but the error doesn't appear anymore).
Let's say ...
8votes
0answers
2kviews
Test in App Billing in other countries
I've developed a app and some logs are reporting errors when a brasilian user tries purchase an item.
I'm not brasilian and I want to test my app in that country. Is it even possible? My app is ...
7votes
2answers
3kviews
Android Billing 4.0.0 - No purchase result querySkuDetailsAsync()
I migrated Google Play Billing Library in Android Studio from 3.0.3 (was working fine) to 4.0.0.
I've checked my Google Play Billing and all seems OK and the SKU status is ACTIVE (no red flags).
I've ...
7votes
1answer
7kviews
inventory.getPurchase() always return null although purchased already
I working with a sample of in-ap purchase. My application have 2 buttons, first button was disable by default, click on second button will purchase and enable the first button. The purchase button ...
7votes
2answers
7kviews
How to create in-app purchase to upgrade from free version to paid version android
I have two version of my app
Paid Version
Free Version
Now in free version I disabled some features that are available only in the paid version.
So what i want is when user taps on any of those ...
7votes
2answers
3kviews
Per Device subscriptions for purchases through Google Play
I would like to setup subscription based billing for an app that will be sold through Google Play. Is it possible to sell the same subscription to the same user but on a different devices? So that ...
7votes
1answer
2kviews
In App Purchase Error in Static codes
I am using current code for purchase for calling purchase intent
Bundle buyIntentBundle = mService.getBuyIntent(3, pContext.getPackageName(), "android.test.canceled", "inapp", "bGoa+V7g/yqDXv");
Set&...
7votes
0answers
931views
Google Play Billing 2.0 testing pending transactions and acknowledgement
I'm transitioning to Google Play Billing library v2.0.0 and there are two major flow differences. One is purchase acknowledgment https://developer.android.com/google/play/billing/...
6votes
6answers
2kviews
Android inapp billing - BillingService has compile errors with onServiceConnected and onServiceDisconnected
I am using the Dungeons application example and I am using the BillingService class provided in that example.
I am using Java 6 and @override works for me, but I get a compile error on these two ...
6votes
4answers
16kviews
Unable to make Android in-app purchase with test account "The publisher cannot purchase this item"
I am attempting to test In-App Purchases in Android.
I have uploaded a privately signed apk to Google Player Developer Console. It is currently a Draft in the "Alpha Testing" section.
When I attempt ...
6votes
1answer
6kviews
Android InApp Purchase: getPurchases returns empty response
I have an app which contains 4 Managed In App Purchases and using In App Billing API v3. The purchases works fine. In order for restoring the purchases, when I make a call to getPurchases(...) it ...
6votes
1answer
2kviews
Check if in-app billing via PlayStore is available to user
So we want to support in-app billing via Google's billing API and via AliPay for China. I've written a method that should return either a GooglePlay or an AliPay billing client (whichever is available)...