en ko zh

Integrate the IAP SDK into Your App

To prepare for integrating IAP features and testing the integration, perform the following.

Download the IAP SDK and sample apps

Download the IAP SDK from this site.

The zipped file contains the SDK and sample projects that uses the IapHelper:

Location

Module

Description

./Libs

IAP6Helper

IAP SDK

./Samples

IAP6Sample

Sample Java app using IAP SDK

./Samples

IAP6SampleKotlin

Sample Kotlin app using IAP SDK

Create a project with a unique package name

Create a project in Android Studio with a package name that is different from the app registered in other app stores.

Add the IAP SDK to your app

  1. Click File → Project Structure → Dependencies tab.

  2. Select your app module and click + → JAR/AAR Dependency from Declared Dependencies.

  3. Add the library path and click OK.

  4. Check the build.gradle file.

Add permissions to AndroidManifest.xml

Add these permissions to AndroidManifest.xml:

  • com.samsung.android.iap.permission.BILLING to connect to IAP and enable in-app item registration in Seller Portal.
  • android.permission.INTERNET because IAP uses the internet.
<uses-permission android:name="com.samsung.android.iap.permission.BILLING"/>
<uses-permission android:name="android.permission.INTERNET"/>

Register an app and in-app items in Seller Portal

During IAP integration, you may need to test IAP features.
Samsung IAP needs information about your app and in-app items registered in Seller Portal.

With the com.samsung.android.iap.permission.BILLING permission added to your app’s AndroidManifest.xml file, you can register an incomplete app and one or more in-app items.

To register an app and its in-app items

  1. Sign in to Seller Portal using your Samsung account.

  2. Click Add New App

  3. Click Android, select the default language, and click Next.



  4. In the Binary tab, upload your app APK.

  5. In the App Information tab, enter fundamental app details.

  6. In the Country / Region & Price tab,
    specify a free or paid app, a paid app price, and countries to sell your items.

  7. In the In App Purchase tab, register one or more in-app items:

a. Click Add Item

b. Enter in-app item information.

c. Click Save.

d. Verify the item is listed

e. When you add a new item, by default, it is inactive (not visible in Galaxy Store). To enable consumers to purchase the item, select it and click Activate.

For more app registration details, see the App Registration Guide.

For more in-app item registration details, see the Item Registration Guide.