Skip to main content
Samsung Developer Program

In-App Purchase Architecture

Integrating Samsung In-App Purchase (IAP) involves your Android app making IAP Helper API calls (for example, to initiate in-app item purchase and get information about available and purchased items), and your app server making IAP Server API calls (for example, to get purchase receipts).

 

Providing Samsung IAP functionality as an Android™ package through AIDL results in quick integration, but it requires developers to employ specialized Android skills to manage various processes, including linking to the IAP service, linking Samsung accounts, and running the IAP package validity tests. 

In Samsung IAP v5.x:

  • Your Android app logic and code make IAP calls to invoke IAP Helper functionality (shown in black in the following illustration).
  • Your app server logic and code make IAP calls to invoke IAP Server functionality (in black).
  • IAP system components support the processing of your calls (in blue).

     

SamsungIAP_v5_Architecture.png

 

Your app can make the following IAP Helper API calls:

getInstance()

Instantiates an IapHelper object that manages in-app item information retrieval, purchases, and consumption.

Returns the value IapHelper.

setOperationMode() Specifies the Samsung IAP operating mode to a test API integration during development (with no financial transactions) or to the normal mode for distributed apps (with financial transactions).
getOwnedList() Returns item and purchase information for items purchased by the user in the OnGetOwnedListListener interface.
getProductsDetails() Returns information about one or more specified in-app items available for purchase in the OnGetProductsDetailsListener interface.

startPayment() 

Initiates the user purchase and payment of the specified in-app item, which IAP manages and then returns the results.

Returns in-app item, purchase, and processing information in the OnPaymentListener interface.

consumePurchasedItems()

Registers the specified consumable in-app item as used, and makes the item available for purchase.

Returns the purchase ID and resulting consumable status of the item and the processing status in the OnConsumePurchasedItemsListener.

 

 

Your app server can make the following IAP Server API calls:

getPurchaseReceipt() Returns details about a specified in-app item purchase that you can use to verify the purchase.
createServiceToken() Generates and returns an access token to authenticate the processing of IAP server-to-server SOAP calls.
getSubscriptionStatus() SOAP call that returns the subscription status (current or expired) and other information about the specified subscription in-app item.

 

  • Was this article helpful?