# Android Query Owned Purchases

**URL:** <https://forums.unrealengine.com/t/android-query-owned-purchases/471284>\
**Category:** Mobile\
**Tags:** unreal-engine, Android, question\
**Created:** [September 13, 2020, 10:07am UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284 "2020-09-13T10:07:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yummy-Vegetables](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yummy-Vegetables](https://forums.unrealengine.com/u/Yummy-Vegetables)\
**Post date:** [September 13, 2020, 10:07am UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/1 "2020-09-13T10:07:41Z")

</div>

I’ve tried to use both of the Query Owned Purchase nodes but had no success getting anything back I can check. I have tested this by actually making a real purchase and also via the test purchase methods. I am struggling to work out how I find out how to get what purchases a player has made.

I don’t want to store this information locally as this is lost if the player moves to a new phone or uninstalls then reinstalls the game.

Is there a trick to making this work or does it not work in 4.25 ?

I also tried to restore purchases (and then check the array returned) however this node like the query for owned purchases node doesn’t seem to work either.

---

<div class="post-metadata">

**Author:** ![Yummy-Vegetables](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yummy-Vegetables](https://forums.unrealengine.com/u/Yummy-Vegetables)\
**Post date:** [September 14, 2020, 7:53am UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/2 "2020-09-14T07:53:49Z")

</div>

Bump - anyone know how to check for owned purchases on Android in 4.25?

---

<div class="post-metadata">

**Author:** ![Yummy-Vegetables](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yummy-Vegetables](https://forums.unrealengine.com/u/Yummy-Vegetables)\
**Post date:** [September 17, 2020, 5:00pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/3 "2020-09-17T17:00:00Z")

</div>

Bump …anyone ?

---

<div class="post-metadata">

**Author:** ![Yummy-Vegetables](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yummy-Vegetables](https://forums.unrealengine.com/u/Yummy-Vegetables)\
**Post date:** [September 24, 2020, 2:20pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/4 "2020-09-24T14:20:27Z")

</div>

bump … again

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_65927d77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_65927d77](https://forums.unrealengine.com/u/anonymous_user_65927d77)\
**Post date:** [February 10, 2021, 11:49am UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/5 "2021-02-10T11:49:46Z")

</div>

Did you resolve this problem or found a workaround? I also tried Query and Restore functions, but the returned arrays are empty. I’m also using 4.25, is it working on other versions?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_65927d77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_65927d77](https://forums.unrealengine.com/u/anonymous_user_65927d77)\
**Post date:** [February 10, 2021, 12:47pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/6 "2021-02-10T12:47:19Z")

</div>

I’m switching to 4.26 after seeing this “Upgraded Android BillingApiV2 to version 3.0.0 to better support in-app purchases.” on the patch note. I hope this will be good.

---

<div class="post-metadata">

**Author:** ![Yummy-Vegetables](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yummy-Vegetables](https://forums.unrealengine.com/u/Yummy-Vegetables)\
**Post date:** [February 11, 2021, 4:06pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/7 "2021-02-11T16:06:09Z")

</div>

Thanks for the info. I tried the Query on 4.26 using test payments and still got null returned. Was wondering if you had success? Was thinking maybe it only works on real payments although I tried a real purchase and it still returns null?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_65927d77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_65927d77](https://forums.unrealengine.com/u/anonymous_user_65927d77)\
**Post date:** [February 11, 2021, 4:38pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/8 "2021-02-11T16:38:05Z")

</div>

Sadly no change with 4.26. I though the same about real payments but I doubt. I checked the match3 example and they save everything locally, the thing we want to avoid obviously.

---

<div class="post-metadata">

**Author:** ![Yummy-Vegetables](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yummy-Vegetables](https://forums.unrealengine.com/u/Yummy-Vegetables)\
**Post date:** [February 11, 2021, 4:53pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/9 "2021-02-11T16:53:25Z")

</div>

Thanks, I use save data to keep a record which is fine until player changes phone so I guess only option is to credit player after receiving complaints.

On another note I was wondering if you have the same issue. Basically if I am in game and swap focus to another app/game it does not pause whilst in the other app. It reloads/restarts. I have save points but it is annoying.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_65927d77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_65927d77](https://forums.unrealengine.com/u/anonymous_user_65927d77)\
**Post date:** [February 11, 2021, 5:22pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/10 "2021-02-11T17:22:14Z")

</div>

Well I guess I will try to save the purchases on a database if I don’t find another solution, that way uninstalling the game or changing phone will not be a problem.

Yes I can confirm the game reloads after changing app. I also tried with a random game probably made with unity and it does the same, So yeah it’s probably a limitation from android and not ue4 base but I can’t confirm that.

---

<div class="post-metadata">

**Author:** ![Dr.SAP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dr.SAP](https://forums.unrealengine.com/u/Dr.SAP)\
**Post date:** [February 22, 2021, 8:00am UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/11 "2021-02-22T08:00:58Z")

</div>

Can I ask if anybody has reported this bug please?

---

<div class="post-metadata">

**Author:** ![Yummy-Vegetables](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yummy-Vegetables](https://forums.unrealengine.com/u/Yummy-Vegetables)\
**Post date:** [February 22, 2021, 1:05pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/12 "2021-02-22T13:05:36Z")

</div>

I’ve not reported it

---

<div class="post-metadata">

**Author:** ![Dr.SAP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dr.SAP](https://forums.unrealengine.com/u/Dr.SAP)\
**Post date:** [February 22, 2021, 1:29pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/13 "2021-02-22T13:29:37Z")

</div>

I have reported today. They might do not know about the bug, we might have a higher chance it get fixed by reporting.

---

<div class="post-metadata">

**Author:** ![Ashyankee](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ashyankee/32/88719_2.png) [@Ashyankee](https://forums.unrealengine.com/u/Ashyankee)\
**Post date:** [April 21, 2021, 5:26am UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/14 "2021-04-21T05:26:16Z")

</div>

any updates on this bug? makes the engine useless for monetization in android

---

<div class="post-metadata">

**Author:** ![Dr.SAP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dr.SAP](https://forums.unrealengine.com/u/Dr.SAP)\
**Post date:** [April 21, 2021, 6:43am UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/15 "2021-04-21T06:43:31Z")

</div>

I can only say that 4.26.2 did not fix the issue after upgrade.

I think more people should report this as a bug to attract their attention to fix it.

---

<div class="post-metadata">

**Author:** ![Ashyankee](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ashyankee/32/88719_2.png) [@Ashyankee](https://forums.unrealengine.com/u/Ashyankee)\
**Post date:** [April 21, 2021, 3:37pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/16 "2021-04-21T15:37:13Z")

</div>

Till this bug is fixed, Are you going to save locally and refund the players if they complain about purchases missing on a new device?

---

<div class="post-metadata">

**Author:** ![Yummy-Vegetables](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yummy-Vegetables](https://forums.unrealengine.com/u/Yummy-Vegetables)\
**Post date:** [May 10, 2021, 7:08pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/17 "2021-05-10T19:08:01Z")

</div>

I have written the purchases to an external database which works fine except I can’t see how to get the players google ID so I can correctly record who has made a purchase. Do you know where/how this can be grabbed? Any ideas?

---

<div class="post-metadata">

**Author:** ![Ashyankee](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ashyankee/32/88719_2.png) [@Ashyankee](https://forums.unrealengine.com/u/Ashyankee)\
**Post date:** [May 10, 2021, 7:41pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/18 "2021-05-10T19:41:33Z")

</div>

I managed to use Google’s own purchase system to do this. UE4 does not acknowledge the purchase. I made my own code and posted here to make the purchase permanent.

> [@Android letting me purchase a non-consumable product more than 1 time](https://forums.unrealengine.com/t/android-letting-me-purchase-a-non-consumable-product-more-than-1-time/225684):
>
> I’m using the following setup to make an in app purchase. I’m able to make the purchase in my app. I have a button setup. When i hit the button, google shows a test card and I’m able to make the purchase - No problem! However, after making the purchase when i hit the button again, Android does not say user already owns the item. I’m able to make another transaction. I’m setting the “is consumable” boolean value to false. How do I make/setup a non-consumable purchase that goes throug…

I’ve also modified the read in app purchases node to get the purchase status of in app items but haven’t posted that anywhere yet.

---

<div class="post-metadata">

**Author:** ![Yummy-Vegetables](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yummy-Vegetables](https://forums.unrealengine.com/u/Yummy-Vegetables)\
**Post date:** [May 12, 2021, 2:41pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/19 "2021-05-12T14:41:06Z")

</div>

Would you be able to post how you modified the read in app purchases to get the status? That would help when a player changes devices.

---

<div class="post-metadata">

**Author:** ![Dr.SAP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dr.SAP](https://forums.unrealengine.com/u/Dr.SAP)\
**Post date:** [May 12, 2021, 3:21pm UTC](https://forums.unrealengine.com/t/android-query-owned-purchases/471284/20 "2021-05-12T15:21:24Z")

</div>

Sorry just saw your question. I have decided to remove non consumable in app purchases.

[Next page](https://forums.unrealengine.com/t/android-query-owned-purchases/471284.md?page=2)
