# \[Solved\] How can I correct IAP error - "Must query store before purchase"?

**URL:** https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162
**Category:** In App Purchase
**Tags:** error
**Created:** [February 26, 2022, 8:42pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162 "2022-02-26T20:42:57Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 26, 2022, 8:42pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/1 "2022-02-26T20:42:57Z")

</div>

Here’s a question from me to anyone with successful **IAP’s** on the _ **iOS app store.** _ or that knows in general what’s going on here

I have a consumable purchase that is approved by the iOS app store. i am calling the purchase as shown in the image below but keep getting an error `"Must query item from store before purchase"`

 ![Screen Shot 2022-02-26 at 3.33.47 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/e/ce94f2f1887dee7e8ea93ad7ce415d32285714c4.png)

I can successfully retrieve Product Info, but the subsequent call fails when using the product id. I’ve tried the following and keep getting the same error mentioned above.

- hard coding the productID,
- using the itemID list block as shown in the image above,
- using the response from the ‘get product info’ call.

does anyone have any suggestions?

@muneer @tatiang @exploriverse.com @martint I hope you dont mind i’m tapping you guys here, I think you 4 have experience on this topic (could be wrong)

I invite anyone with helpful input to respond here! Thanks in advance.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [February 26, 2022, 8:52pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/2 "2022-02-26T20:52:20Z")

</div>

I never mind! 🙂

But I haven’t used IAPs before, sorry.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [February 26, 2022, 8:55pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/3 "2022-02-26T20:55:03Z")

</div>

First thing to know that for AppStore you need to so the following steps:

**Step 1** is to add a “blank” IAP component to your app and upload it to TestFlight/Play Store Beta. This update will then contain the IAP intent and will allow you to create your items and subscriptions

**Step 2** Create the items and/or subscriptions you want your app to have, and then copy/paste them back into your Thunkable app.

**Step 3** Rebuild your app and republish, the newest update will contain both the IAP intent and the IAP items available to purchase.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 26, 2022, 9:12pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/4 "2022-02-26T21:12:44Z")

</div>

Thank you! As far as I can tell I did all this.

I’ve sent several builds to TestFlight since the iap was approved.

I had actually created the iap on the AppStore before I sent the app version with iap blocks. Then Apple reviewed and approved the iap and app.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/d/bdfc024f34fc0da0fa4835f4ddeea6a9e758fe8e.jpeg)

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [February 26, 2022, 9:30pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/5 "2022-02-26T21:30:06Z")

</div>

Can you show the green block `List of item info` from the `Get Products Info` and see that have a matching product in the Thunkable component list.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 26, 2022, 9:31pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/6 "2022-02-26T21:31:33Z")

</div>

`[{"type":0,"priceAmountMicros":4990000,"title":"POB - Remove Ads","productId":"pob_remove_ads_1","description":"Purchase this once, remove ads forever","priceCurrencyCode":"USD","price":"$4.99","subscriptionPeriod":"P0D"}]`

This is returned, then I try to make the purchase and receive the above mentioned error.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [February 26, 2022, 9:34pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/7 "2022-02-26T21:34:34Z")

</div>

> [@jared](#):
>
> “productId”:“pob\_remove\_ads\_1”

Do you have this product in the `iOS: item list` in the In-App component?

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 26, 2022, 9:34pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/8 "2022-02-26T21:34:59Z")

</div>

The item is in the list of items for sale.

 ![Screen Shot 2022-02-26 at 4.35.25 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/6/f69e13ece8642d620199704ba98aa5253e3ad61d.png)

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [February 26, 2022, 9:38pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/9 "2022-02-26T21:38:11Z")

</div>

Can you pass it to the purchase component as **text** instead of selecting an item from the list?

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 26, 2022, 9:38pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/10 "2022-02-26T21:38:58Z")

</div>

I’ve been trying this but will try by using an actual text block for the input.

 ![Screen Shot 2022-02-26 at 4.38.29 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/9/c9870c9940d909ccdad11b6e8f1355ef63f4e05f.png)

sending a copy to test flight now like this

 ![Screen Shot 2022-02-26 at 4.39.26 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/a/8a1065ddae016d0bd8432aa6fdf8aa2e6d603f52.png)

Also, thanks for your time @muneer and @tatiang

[update]

Testing for a Hard coded productId with text block produced the same error

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/4/a4e694ae6a96994bdc07237c6cbabc54083a7480.jpeg)

---

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [February 26, 2022, 10:30pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/11 "2022-02-26T22:30:41Z")

</div>

Hi Jared,

Have you tried it without the first ‘Get products info’ block?

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 26, 2022, 10:31pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/12 "2022-02-26T22:31:59Z")

</div>

Yes and thank you!

---

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [February 26, 2022, 10:38pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/13 "2022-02-26T22:38:15Z")

</div>

Something has changed, just tested and I am getting the same issue on IOS, was ok before updating the app 4 days ago?

---

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [February 26, 2022, 10:47pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/14 "2022-02-26T22:47:22Z")

</div>

Can you have a word with the devs Jared, see whats changed.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 26, 2022, 10:47pm UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/15 "2022-02-26T22:47:39Z")

</div>

I’ve already filed a bug report. I’ll keep monitoring the bug report and this channel.

---

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [February 28, 2022, 9:24am UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/16 "2022-02-28T09:24:48Z")

</div>

Do we know if anyone is looking at this yet?

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 28, 2022, 10:37am UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/17 "2022-02-28T10:37:01Z")

</div>

Give it until this afternoon. Then I’ll update again. 🙂

---

<div class="post-metadata">

### Author: ![glossydulv](https://avatars.discourse-cdn.com/v4/letter/g/e99b99/32.png) [@glossydulv](https://community.thunkable.com/u/glossydulv)
#### Post date: [March 2, 2022, 11:43am UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/18 "2022-03-02T11:43:05Z")

</div>

Having the same problem. Hopefully an update soon!

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [March 3, 2022, 4:39am UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/19 "2022-03-03T04:39:38Z")

</div>

If you were experiencing this before, please try pushing a new version to TestFlight to test it out again!

---

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [March 3, 2022, 9:37am UTC](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162/20 "2022-03-03T09:37:15Z")

</div>

my current platform version is v304-6-prod, I already tried pushing an update on this platform version a couple of days ago and still same.

[Next page](https://community.thunkable.com/t/solved-how-can-i-correct-iap-error-must-query-store-before-purchase/1757162.md?page=2)
