In-App Purchases on Android not working

I am trying to get the IAP to get working on android but, It keeps giving back a failed.
I have followed the : Using In-App Purchases on Android | Unreal Engine Documentation Tutorial

These are the things I tried.

Added permissions to the project settings.

android.permission.INTERNET for triggering ads
com.android.vending.BILLING for the IAP

Created a android folder and added a AndroidEngine.ini

with the Text:
[OnlineSubsystem]
DefaultPlatformService=GooglePlay

[OnlineSubsystemGooglePlay.Store]
bSupportsInAppPurchasing=True

And triggering the IAP popup with a button click Like this.

All I get Back is a failed trigger, No window popup or anything.
I just use the IAP name I created in the developer console.
Do I need to use a special prefix before the IAP name in the product identifier?
Also I am testing this as a build version that has not been uploaded to the store.

Do I need to push this version first to get it to work? I would like to prevent this because I donā€™t want to bother my users with testing versions.

Also The IAP Has been created for a week now. So It should be able to read it.

Thanks in advance.

maybe you should check first if your google play services work? can you login to your app?

We are having this issue, as well.

Google Play services do workā€“weā€™re able to log in to Google Play Games, we can receive achievements, etc. In-App purchases donā€™t even attempt to go through, however; we just receive an instant failure notice.

UE4 version is 4.18.3! Following in the hopes that someone has a fix. :slight_smile:

It was working for me for a thew days, then just stoppedā€¦

For any google related things you need to upload the APK to google play and test it in a device that has downloaded the app from the store.

Did you find a solution for this?

Iā€™m surprised staff hasnā€™t addressed this. Iā€™m very curious to know the outcome

You donā€™t need to create android folder itā€™s already there.

This is what fixed my problem with IAP:

Go to Unreal Engine installation folder for me itā€™s O:\UnrealEngine\UE_4.16\Engine\Config\Android Open AndroidEngine file and just add:

[OnlineSubsystemGooglePlay.Store]
bSupportsInAppPurchasing=True

Remember to save the file before exiting. IAP will show after that.

I found this answer and itā€™s useful, try it.

The issue i ran into when using 4.25.3 and setting everything up according to documentation, forums, and match3 demo, was that i completely overlooked that there is a v1 and v2 for purchasing. so in match3, they use v2, and by default, v2 purchasing is enabled in the engine configs. however, i was calling the v1 function (which looks almost identical other than not be labeled as v2) and thus the app kept returning ā€˜not allowedā€™ as a reason for failure. while iā€™m going to stick with v2, i imagine if you set your in app purchasing to use v2=false, then you can use the v1 node and it will probably work.

I can get consumable purchases to work setting the v2 store to ā€œtrueā€ and using the v2 nodes. However subscriptions (non-consumable) fail. They dont seem to get a response from google play at all. The non-consumable boolean doesnā€™t appear to do anything. I have tried UE 4.25.3 and 4.26 without success (although both work with consumable).

Same promlem. Change to v2 - good idea. It worked for me, but why nobody talk about this small thing in Unreal Docs? i cant find vesrsion setup in Unreal Projectā€¦

Also happened to me, i switched to v2 and now it works with one exception: non-consumable bool is now ignored, and all the purchases are beeing treated as consumables. Obviously ā€œrestore in app purchasesā€ does not return anything anymore. Anyone submitted a bug report?

1 Like

the v2 doesnt work with me why

I still canā€™t get this to work. Should I tick the ā€œconsumableā€ or not for blueprint node ā€œMake InAppPurchaseProductRequest2ā€?

ā€œMake In-App Purchase V2ā€ works but how to read/query In-App Purchases to get their details such as cost, currency symbol etc?

I am asking because both ā€œRead In-App Purchase Information2ā€ and ā€œRead In-App Purchase Informationā€ donā€™t work when bUseStoreV2=true

So how do you guys query for purchases?