Questions tagged [android-billing]

Android In-app Billing is a Google Play service that lets you sell digital content from inside your applications.

You can use the service to sell a wide range of content, including downloadable content such as media files or photos, virtual content such as game levels or potions, premium services and features, and more. You can use In-app Billing to sell products as:

Standard in-app products (one-time billing), or

Subscriptions, (recurring, automated billing)

Useful links

475 questions
10
votes
1 answer

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 permission to developer console as alpha build. Added…
greg84
  • 7,541
  • 3
  • 36
  • 45
10
votes
2 answers

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 anything. The content of the querySku field passed to…
Richard Lewin
  • 1,870
  • 1
  • 19
  • 26
10
votes
0 answers

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 european so I tried with USA: I tried with a north…
9
votes
2 answers

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 want to update the old code without releasing an…
AndreaF
  • 11,975
  • 27
  • 102
  • 168
8
votes
3 answers

Google Play Billing v5 - Get a product's price

In v4, I used to have SkuDetails.price to get the price of the product but now it's not available anymore in the new ProductDetails in v5. How can I get the price of a product in this new version?
Jay N
  • 348
  • 3
  • 11
8
votes
1 answer

How to know if a user has used a free trial with Google Play Billing Library?

I can't seem to find any relevant information in the Purchase object returned by Google. I know there is a "getFreeTrialPeriod()" method for SkuDetails, but that only returns the duration of the free trial, and not if the user used the free trial or…
Michael Eilers Smith
  • 8,466
  • 20
  • 71
  • 106
8
votes
4 answers

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 documentation is very short and provides only a part…
Yoann Hercouet
  • 17,894
  • 5
  • 58
  • 85
8
votes
0 answers

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 correctly for this developer's public key. * *…
8
votes
0 answers

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 Billing Library to simplify your development …
8
votes
1 answer

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 the original) and one for Android TV devices, so I…
Vektor88
  • 4,841
  • 11
  • 59
  • 111
8
votes
2 answers

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, when you start the app you go through a sign-up flow…
8
votes
0 answers

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 that in my MainActivity I have a button where…
8
votes
1 answer

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 work correct but after purchase, I've check the…
Han Tran
  • 2,073
  • 4
  • 22
  • 37
8
votes
1 answer

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't want to publish this draft. However, I can't…
Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
8
votes
4 answers

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 variable? Which should it be?
Genadinik
  • 18,153
  • 63
  • 185
  • 284
1 2
3
31 32