In-App Purchase Architecture
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).
Your app can make the following IAP Helper API calls:
Instantiates an IapHelper object that manages in-app item information retrieval, purchases, and consumption. Returns the value |
|
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. |
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. |
|
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. |