question

Marcus Johansson avatar image
Marcus Johansson asked

Why does Amazon testers get "An error occurred while processing your purchase"?

IAP works perfectly in Live App Testing for our game. No player has any problems buying any of the products. But after submitting the game to Amazon for release they say that IAP does not work and sent us an image of a message box with the title "An error occurred while processing your puchase".


From the log they sent us we can see that onProductDataResponse is called and that getRequestStatus returns SUCCESSFUL. But getProductData obviously returns an empty set. How can this work in Live App Testing but not when Amazon tests the app?


We also noted this in the log from Amazon:

2023-08-24 10:05:56.759 25816-25842 com.amazon...Identifier pid-25816 I Finding API Key for xxxxxx

2023-08-24 10:05:56.772 25816-25842 com.amazon...urceParser pid-25816 I Unable to get api key asset document: api_key.txt

2023-08-24 10:05:56.772 25816-25842 com.amazon...urceParser pid-25816 W Unable to get API Key from Assests

2023-08-24 10:05:56.772 25816-25842 com.amazon...urceParser pid-25816 I Attempting to parse API Key from meta data in Android manifest

2023-08-24 10:05:56.773 25816-25842 com.amazon...urceParser pid-25816 I Attempting to parse API Key from meta data in Android manifest

2023-08-24 10:05:56.775 25816-25842 com.amazon...KeyDecoder pid-25816 I Begin decoding API Key for packageName=xxxxxx

2023-08-24 10:05:56.776 25816-25842 com.amazon...ecoder.PII pid-25816 D APIKey:<obscured>

2023-08-24 10:05:56.776 25816-25842 com.amazon...KeyDecoder pid-25816 W Unable to decode APIKey for pkg=xxxxxx


We don't use any Amazon sdk other than the one for IAP. Are we still required to have an api_key.txt file in the assets? We thought it was only required when using ADM.


We're kind of stuck here.

iapapp submission and updateslive app testing
2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

As a test we replaced the IAP code in our game with the one used in the Google Play version, using the Appstore Billing Compatibility SDK. Again, it worked perfectly for our testers during Live App Testing, but for Amazon it failed.

And does anyone know the answer to the question above:

"We don't use any Amazon sdk other than the one for IAP. Are we still required to have an api_key.txt file in the assets? We thought it was only required when using ADM."

Amazon won't respond.

0 Likes 0 ·

Amazon sent us a log for the version of the game where we're using the Appstore Billing Compability SDK. Now we can see why the product list we get is empty. This is the output from the Appstore SDK:


2023-09-27 20:17:44.840 19992-20029/? E/Kiwi: Appstore SDK - Production Mode: a: Error parsing JSON for SKU xxx.xxxxxx.xxxxxxxx: Price must not be null or empty


There's one of these lines for every product that we request information about. But we have set the prices in the control panel and all the products are marked as Live.


The SDK outputs the entire JSON, and we can see that there's no price item present for any of the products. The other information in the json (sku, title, description ...) is correct.


How can this be possible, and what can we do about it?

0 Likes 0 ·

1 Answer

Marcus Johansson avatar image
Marcus Johansson answered

It seems that the problem was on our side, kind of. We had planned a soft launch in just a few countries. The testers at Amazon obviously weren't located in any of those countries, so the app couldn't access the products on their devices.


10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.