Skip to main content
Samsung Developer Program

IAP Features, Changes, and Requirements

 

Samsung In App Purchase (IAP) provides a wide variety of features to support your in-app items, has changed to provide more support, and has some integration requirements

Samsung IAP Features and Changes

The functional features and changes for major Samsung In App Purchase (IAP) releases.
 

Samsung IAP version 5.x features and changes:

  • In-app types were simplified to: items (consumable and non-consumable) and subscriptions (auto-recurring only).
    Non-recurring subscription in-app items are no longer supported.

  • Added functionality:

    • Get details about in-app items available for purchase.
    • Get  a list of user-purchased in-app items.
    • Use pass-through parameter functionality to enhance in-app item purchase security.
    • Get user purchase receipts, whether the purchase was successful or not, to perform enhanced purchase verification.
    • Automatically ensure that user-purchased consumable items cannot be repurchased until appropriate (for example, after they are used) by requiring them to be reported as consumed.
       

 

IAP v4.x (latest) In IAP v5.x

IAP package names: 

  • Helper: com.samsung.android.sdk.iap

IAP package names:

  • Helper: com.samsung.android.sdk.iap.lib
  • Sample: com.samsung.android.sdk.iap.sample5

IAP permissions:

  • com.sec.android.app.billing.permission.BILLING

IAP permissions:

  • com.samsung.android.iap.permission.BILLING
IDE: Android Studio 1.1.0 IDE: Android Studio 2.3.3

getInstance(_context, _mode)

Instantiates a SamsungIapHelper object, and sets IAP operating mode to production or test modes.

getInstance(_context)

Instantiates an IapHelper object.

 

setOperationMode(_mode)

Sets IAP operating mode to production or test modes.

getItemList(_startNum, _endNum, _itemType, _mode, _onGetItemListener)

Returns information about one or more in-app items available for purchase.

getProductsDetails(_productIds, _onGetProductsDetailsListener)

Same purpose.
 

getItemInboxList(_startNum, _endNum, _startDate, _endDate, _onGetInboxListener)

getItemInboxList(_itemIds, _onGetInboxListener)

Returns information about one or more purchased in-app items.

 

 

getOwnedList(_productType, _onGetOwned ListListener)

Returns information about all purchased in-app items, all subscription items, or all non-subscription items (consumable and non-consumable).

 

consumePurchasedItems(_purchaseIds, _onConsumePurchasedItemsListener)

Registers one or more purchased consumable items as used, and enables repurchase.

startPayment( _itemId, _showSuccessDialog, _onPaymentListener)

Initiates an in-app item purchase and payment transaction.

startPayment( _itemId, _passThroughParam, _showSuccessDialog, _onPaymentListener)

Same purpose.

 

 

Samsung IAP version 4.x features:

  • IAP functionality is supported by Samsung Billing, which is preloaded on Samsung devices.
     

Samsung IAP version 3.x features and changes:

  • Users can now pay using credit cards, prepaid cards, and phone bills in more than 90 countries.
  • Auto-recurring subscription items are now supported with automatically recurring billing.
  • Customized in-app item ID enables you to assign additional custom alphanumeric item IDs (such as COIN, wand, and monthlyBulletin05).
  • Added a method to get a cached list of purchased in-app items for a specified number of purchased item IDs. Cached list retrieval is faster, because client caching is supported.
  • ItemGroupId (12 digits) has been replaced by PackageName to identify your Android app.
  • You can test the entire In-App Purchase process without the risk of making actual financial transactions (with actual credit card billing) by enabling either of two IAP developer test modes.
  • IAP Library was changed to IAP Helper.
  • The IAP Helper has been renamed:com.sec.android.iap
  • The Sample package has been renamed:com.samsung.android.sdk.iap
  • The IAP SDK development environment has changed from Eclipse to Android Studio 1.1.0, the industry-standard development environment.    
     
IAP v1.x and v2.x In IAP v3.x

getItemList(_itemGroupId, _startNum, _endNum, _itemType, _mode)

Returns information about one or more in-app items available for purchase.

getItemList(_startNum, _endNum, _itemType, _mode)

Same purpose.
 

startPayment(_itemGroupId, _itemId, _showSuccessDialog)

Initiates an in-app item purchase and payment transaction.

startPayment( _itemId, _showSuccessDialog, _onPaymentListener)

Same purpose.
 

getItemInboxList(_itemGroupId, _startNum, _endNum, _startDate, _endDate)

Returns a list of purchased in-app items.

getItemInboxList(_startNum, _endNum, _startDate, _endDate)

Same purpose.

 

 

Samsung IAP version 2.x features:

  • The IAP service is provided as an Android™ package to ensure independence between Android apps.
  • Communication between Android apps and Samsung IAP by means of the Android Interface Definition Language (AIDL). 

Samsung IAP version 1.x features:

  • The payment service is linked to the Android app using a jar library.

 

Samsung IAP Requirements

Samsung In-App Purchase (IAP) version 5.x requires the following.
 

Android App

In-App Items

Device

  • Platform: Samsung mobile devices
  • OS: Android API 14 (Android™ 4.0 Ice Cream Sandwich) or later
  • Installed:
    • IAP package
    • Samsung Account Mobile Client or another Samsung Account channel interface
    • Galaxy Apps version 4.2.13.x or later
       

User

  • Samsung Account user account
  • Samsung Billing user account

 

Example Core IAP Helper Code

The following source code includes IAP Helper requests that support and implement the in-app item purchase function.

public class MainActivity extends AppCompatActivity implements OnPaymentListener { 
    // Please change the ITEM_ID for your application.     
    // ========================================================================     
    private static final String ITEM_ID  = "Nuclear";     
    // ======================================================================== 
 
    private IapHelper    mIapHelper  = null; 
 
    @Override     
    protected void onCreate(Bundle savedInstanceState) {         
        super.onCreate(savedInstanceState);         
        setContentView(R.layout.activity_main); 
        
        mIapHelper = IapHelper.getInstance(this);         
        mIapHelper.setOperationMode(OPERATION_MODE_PRODUCTION);     
    }

    public void doPurchase(View _view) {         
    // The passThroughParam should be a generated value by you.         
    mIapHelper.startPayment(ITEM_ID, "pLKjLKjLJL87=76df56rf+4f5", true, this); 
    } 
   
    @Override     
    public void onPayment(ErrorVo _errorVO, PurchaseVo _purchaseVO) { 
 
        // Success or failure of payment is processed here.     
    }
}