Android In App Purchase

Someone help me please. Been stuck on this for a week. There is not a single article or documentation online that I have not tried and tested. Nothing is working. Here is the procedure and method im following please someone tell me why this is not working because why it doesn’t is beyond me!

  • Read In App Purchase Information

  • Make In App Purchase

  • AndroidEngine.ini

288889-androidengine.png

For the record I do test on a shipped and uploaded build to Google Play Store.

Please someone help me, I really do need it as I am deeply stuck with this and is holding me back for an entire week now. Any help is greatly appreciated. Seriously.

1 Like

I recently used the In-App Purchase for the first time and I also encountered some problems but now I have everything working, a few things that might help:

  1. Make sure it’s on the Google Play Console, I’ve always tested it on the google internal test.

  2. Obviously, make sure that ‘Enable Google Play Support’ is Enabled in Project Settings.

  3. Check if you are really connected to the Play Store, you can use the node ‘Show External Login UI’ to see if you can connect your Play Store account to your app.

  4. Make sure you have these Permissions in Project Settings - Advanced APK Packaging - Extra Permissions. ‘com.android.vending.BILLING’ and ‘android.permission.GET_ACCOUNTS’.

  5. Also, check if the ‘Product Identifiers’ is completely the same as the one you have created on the Google Play Console.

I can remember that I had such a problem as you so if all of this doesn’t work for you, I will spend some extra time finding out exactly what my problem was and what the solution was.
I really hope that these tips already help you and otherwise I like to hear from you, things like this are always annoying and I would like to help you.

2 Likes

Thanks! This is useful!

How to check if a product was already bought or not? What if we install game in another device, we get all the purchased items ?

That is fairly easy. You need the ‘Restore In-App Purchases’ node for that. Input = Consumable Product Flags and Player Controller.

Make sure you do your purchases well, only those purchases that are not consumable will be returned in the array. Then if you have the array of things that someone has bought you can compare them with the things they have and put everything right when needed.

Any idea about subscription products for in app purchases like in “PUBG”

No, I have never done that myself.
You should ask this question separately on the UE4 Answerhub.
Then you will probably get a quicker answer to this question.

Hello, to everyone who is experiencing problems with the purchasing system in Unreal Engine 4/5!
The way I found to SOLVE this was to upload a new keystore to the Google Play Console and a bunch of other things, to create a new keystore (Follow the tutorial in the link below, don’t forget to like)
IMPORTANT: After the tutorial, if necessary, delete the new version of Java installed in the environment variables and go back to the previous version to avoid JDK errors when compiling your game.

Procedures in Unreal Engine/Google Play Console

To add a new keystore to your game on the Google Play Console go to > Versions > Configuration > App Signing > Upgrade your app’s signing key - Select the java keystore key option and a reason, watch the video to understand better = https://www.youtube.com/watch?v=pCczRHsdNOY

install Google Play Service related plugins!

In EU, on-premises > Project Settings > Platforms > Android

  • The key license must be entered, you will find it under > Google Play Console > Monetization > Monetization setup > License

  • Enter the game ID that is shown in the Google Play Console, go to > Growth > Google Play Game Related Services > Setup and Management > Setup > Project ID (12 numbers)!

  • Enable Google Play Support (Enabled)

  • Add 2 Extra Tags to node:

com.google.android.gms.games.APP_ID=“@string/app_id”
com.google.android.gms.appstate.APP_ID=“@string/app_id”

  • Add 5 tags in Extra Permissions:

android.permission.INTERNET
android.permission.ACCESS_NETWORK_STATE
com.android.vending.BILLING
android.permission.USE_CREDENTIALS
android.permission.GET_ACCOUNTS

(I didn’t really understand this part but I did it this way and it worked).

The blueprint (Shopping Menu Widget) in the image shown was the only one that worked for me, I tried 4 ways, I will publish a related video as soon as possible, I ask you to open my profile if you want to see the video as I am publishing this solution in all topics related to this problem because I know it is very stressful.
After node Make an in-app purchase, the item you sold must be inserted in on success, try to adapt this logic according to your project.

If you need help, contact me.
Luis Ramos

Does this work for you in Unreal 5.3?

In fact, has anyone gotten UE 5.3 in-app purchases working at all for Android or iOS?

I believe you will have no problems doing this in 5.3, as long as it is the V2 purchase and verification nodes. You have to be logged in to Google Play Games too! This can be done just by pulling a Show External Login UI node…

I think I pretty much did those steps, but am crashing on the Java call. Here’s the thread on the issue myself a few others were seeing. This only happens on UE 5.3. It works fine on UE 5.2 for us on Android (although iOS doesn’t work unless you go back to UE 5.0).

THE UNIVERSE! I NEED YOUR ENEGRY!!!

this builds 5.3

1 Like

Hello! It’s working? Did it present an error? Was the login to Google Play Games performed before?

Hello! Is the problem solved in 5.3 version? If possible update your Unreal Engine to 5.4 and perform tests please!

well, for some reason it always fails, but it builds, make sure you add the start in app purchase simple version ebfore the complex one, this allows you to build without error, so far, when i read the iap im also getting some random stuff, like, so its probably my end need to set it up or something, still working on it, set it up on all sides, etc, when i get it working ill post

my issue for some reason is just i get errors and idk if its withdrawing the correct data from the right store iap, could be someone elses app lol, idk what happening, or maybe its giving me dummy reads of iap, some reason no connection happening between my proj and googles iaps


this works, but my issue isnt just the set up, its somehow unreal isnt connecting with my google account, gotta fix that, more research

edit: implemented the external login ui and it fails on android currently, need to set up google play service, then get back to it, i believe this code works, but need testin

edit: it could also be failing because i forgot to generate sha1 finger print for the google store,

edit 3: good news, i got the google play working, had to extract the sha1 from my keystore to use in credentials for the google store, anyhow, bad news, is it does crash.