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).