Skip to main content
Samsung Developer Program

Integrate IAP Functions into Your Android App

IAP Helper API call information and example code to help guide you in integrating IAP into your Android app, and to facilitate development and testing


To integrate IAP into your Android app and sell its in-app items:

Your Android app must support these functions (for example, by directing the user to select an item for purchase). 

Note: IAP Helper provides client-server purchase verification to reduce malicious purchases, which does not require integration of your app server.

For increased transaction safety, we recommend that you can employ server-server purchase verification, which does require Android app and app server integration. For details, see Integrate Samsung IAP into Your App Server.


The procedures in this section include example logic and code, object names, and explanations in order to help guide you in integrating IAP into your Android app, and to facilitate development and testing of your IAP integration. However, other options may be more appropriate for the release version of your Android app.  For details about options other than those presented in this section, see the sample app code in the IAP SDK.

Example Code Options for Your Android App
The IAP operating mode changes among the production mode and the two developer test modes in order to meet the requirements of development and testing. The IAP operating mode remains in production mode.
Example in-app item IDs are hard-coded. Item IDs registered in Seller Office to your Android app must be used.

Example details are hard-coded and returned for requested in-app item details.

In-app item details may be hard-coded; but they must be correct for your items.

getProductsDetails() returns the item details registered in Seller Office.

A UI button click initiates retrieval of a list of in-app items purchased by the user.

Initiate list retrieval:

  • During app initialization
  • After item updates in Samsung Seller Office
  • After a set amount of time (to keep item data current)
  • After every startup
  • In response to a user action, such as selecting a purchase item screen

After getting details about one or more in-app items, details are displayed in an alert dialog box without the user able to select or purchase an item.

In-app item details:

  • Display the offered items in a purchase screen.
  • Enable user selection of an item, and initiation of an IAP purchase and payment transaction.