Enhanced Verification of In-App Item Purchases
IAP Helper enables in-app item purchase verification that involves only your Android app. IAP Helper and IAP Server enable enhanced purchase verification to reduce malicious purchases, which involves your Android app and app server.
During a successful in-app item purchase and payment transaction, Samsung IAP assigns a unique
purchaseId . Your Android app receives the purchase ID and additional purchase and in-app item information in the
PurchaseVo object of the
However in certain scenarios, your Android app may not receive the
PurchaseVo object (for example, due to network issues) even though the purchase and payment transaction was successful. Your Android app can get the same fundamental purchase information by making a
getOwnList() request to get the
We recommend that your Android app and app server perform enhanced server verification of in-app item purchases. Your app server or Android app can verify an in-app item purchase by using
getPurchaseReceipt() response information and
OwnedListVo object information.
Your Android app must provide the purchase ID to your app server using a method that is independent of Samsung IAP. If your app server is going perform the verification, then your Android app must provide the necessary information to your app server.
Your app server specifies the ID in a
getPurchaseReceipt() request, which returns information about the in-app item and the purchase and payment transaction.
Your app server or Android app can verify the item purchase.
Note: The diagram above is based on your Android app performing the verification.
Enhanced server verification can be based on the following and other data:
|Condition||PurchaseVo and OwnedProductVo
Get the Status of a Purchased Subscription Item
IAP Helper and IAP Server enable getting the current subscription status (active or expired) of a subscription item purchased by the user, which involves your Android app and app server.
Although the item ID is registered in Seller Office and is specified in
startPayment() requests, it is also provided in the
PurchaseVo object of the
onPaymentListener interface in the
OwnedListVo object of the
Note: The subscription item must have been purchased prior to your app server making a
Your Android app must provide the ID of the in-app item to your app server using a method that is independent of Samsung IAP. Your app server specifies the item ID in a
getSubscriptionStatus() request, which returns information about the in-app item, including:
subscriptionStatus=ACTIVEwhen the item's subscription is current.
subscriptionStatus=CANCELwhen the item's subscription has expired.
Your app server or Android app can take action based on the current status of the subscription.
Note: The diagram above is based on your Android app using the status to take action.
For more details, see getSubsriptionStatus().