Amazon Appstore IAP testing
To test in-app purchases for your app destined for the Amazon Appstore, you have two options:
- Test in production, by distributing your app via Amazon's Live App Testing
- Test in sandbox, by side loading your app and using the Amazon Tester App
Let's look at what's required for each now.
To test in production, you need to distribute your app via Amazon Live App Testing. Details can be found in Amazon's documentation here.
You must include your Appstore public key in your app in order to conduct product IAP testing. Learn details on configuring your key here.
You may receive an error like this if your key is not properly setup:
Missing Products on your Paywall in Production?
Please make sure you have Amazon products attached to your paywall. First, you need to setup the IAP items in the Nami Control Center per this guide.
Missing Key Generates this Error:
2023-02-06 16:12:46.136 9330-9361/com.namiml.app.test E/Kiwi: AbstractCommandTask: On Exception!!!!: com.amazon.a.a.o.b.a.a: DATA_AUTH_KEY_LOAD_FAILURE: CERT_FAILED_TO_LOAD: java.security.spec.InvalidKeySpecException:java.lang.RuntimeException: error:0c000079:ASN.1 encoding routines:OPENSSL_internal:HEADER_TOO_LONG/java.lang.RuntimeException:error:0c000079:ASN.1 encoding routines:OPENSSL_internal:HEADER_TOO_LONG
Key is Present, but App is Sideloaded so No Production IAP Auth
E/Kiwi: AbstractCommandTask: On Exception!!!!: com.amazon.a.a.n.a.a.a: AUTH_TOKEN_VERIFICATION_FAILURE: null: null
To test in the sandbox, you can side load your app to an Amazon Fire TV device.
In order for to conduct purchase testing you also need to install and setup the Amazon App Tester app on the device. See more details from Amazon's documentation, here.
Missing Products on your Paywall in Sandbox?
Be sure you've following Amazon's instructions on pushing IAP items to your device via adb.
The IAP items also need to be configured in the Nami Control Center per this guide.
Updated about 2 months ago