Integrate IAP for Amazon with SDKBOX


Getting IAP to work with amazon requires the following steps

  1. Setup app and store listing in Amazon Developer Console
  2. Adding In-app items for your app
  3. Integrate purchase logic with your code
  4. Setup testing environment for Amazon IAP

Setup IAP with Amazon

1. Sign up

Before you start, please make sure you have an amazon developer account 

2. Create new application

You can create a new application in Amazon Developer Console here

3. setup IAP items with amazon

Create your IAP items under “In-App Items” menu, make sure the IAP item  in “Ready to Submit” state before you start testing them.amazon_iap_items


4. Edit sdkbox_config.json

Edit your sdkbox_config.json file and add your amazon IAP-item here, make sure the id match with the id in amazon

Here is a sample for amazon IAP configuration


Integrate IAP in your code

Initialize iap when your app starts with following function

Make purchase with following code

Note: the “remove_ads” is what’s in the sdkbox_config.json we edited earlier

Testing IAP

To test Amazon IAP locally you need to install Amazon app tester on your device. And upload the json file of your IAP items onto your device.

Download IAP item json file from amazon

You can read amazon’s official guide here for more detail.

Posted in programming Tagged with: