Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Develop
Test
Publish
Monetize
Engage users
Device specifications
Resources
Skip to main content
This document gives an overview of the available methods and events for the Appstore SDK plugin and the IAP SDK v2.0 plugin for all the supported cross-platform engines.

Plugin methods

Use method calls to initiate requests. The following table describes the available methods. Methods with a return type of RequestOutput receive an asynchronous event (a system-generated message). The supporting data objects table below describes the method parameters and events.
Return TypeMethodMethod SummaryEvent
RequestOutputGetUserData()Initiates a request to retrieve the user ID and marketplace of the currently logged-in user.GetUserDataResponse
RequestOutputPurchase(SkuInput input)Initiates a purchase-flow for a product.PurchaseResponse
RequestOutputGetProductData(SkusInput input)Initiates a request to retrieve item data for up to one hundred SKUs.GetProductDataResponse
RequestOutputGetPurchaseUpdates(ResetInput input)Initiates a request to retrieve updates about items the customer has purchased and/or cancelled.GetPurchaseUpdatesResponse
RequestOutputVerifyLicense()
This method is only available in the Appstore SDK plugin.
Initiates the request to get the license/entitlement.LicenseResponse
GetAppstoreSDKModeOutputGetAppstoreSDKMode()
This method is only available in the Appstore SDK plugin.
Returns the AppstoreSDK operating mode.None
voidNotifyFulfillment(NotifyFulfillmentInput input)Notifies Amazon about the purchase fulfillment.None

Supporting data objects

The following table describes method parameters and event objects.
ObjectMembersDescription
AmazonUserDatastring userIdThe user ID.
string marketplaceThe two-character ISO 3166-1 Alpha-2 code denoting the marketplace of the user. Can be null if the marketplace information is not available; this may happen with previous versions of the Amazon Appstore.
GetAppstoreSDKModeOutput
This object is only available in the Appstore SDK plugin.
string appstoreSDKModeThe current operating mode for Appstore SDK. `SANDBOX` tells if it’s running locally with App Tester or running in `PRODUCTION`.
GetProductDataResponsestring requestIdThe request ID originally returned by GetProductData.
ProductDataMap productDataMapSee ProductDataMap.
List < string > unavaliableSkusThe list of SKUs provided in the original request for which product data is not available.
string statusOne of SUCCESSFUL, NOT_SUPPORTED, or FAILED. SUCCESSFUL indicates a successful request. NOT_SUPPORTED indicates this call is not supported. FAILED indicates an unsuccessful request.
GetPurchaseUpdatesResponsestring requestIdThe request ID originally returned by GetPurchaseUpdates.
AmazonUserData amazonUserDataSee AmazonUserData.
List <PurchaseReceipt> receiptsReturns a list of receipts, or an empty list if status is not SUCCESSFUL or there are no receipts.
string statusOne of SUCCESSFUL, NOT_SUPPORTED, or FAILED. SUCCESSFUL indicates a successful request. NOT_SUPPORTED indicates this call is not supported. FAILED indicates an unsuccessful request.
boolean hasMoreTrue if more results are available.
GetUserDataResponsestring requestIdThe request ID originally returned by GetUserData.
AmazonUserData amazonUserDataSee AmazonUserData.
string statusOne of SUCCESSFUL, NOT_SUPPORTED, or FAILED. SUCCESSFUL indicates a successful request. NOT_SUPPORTED indicates this call is not supported. FAILED indicates an unsuccessful request.
LicenseResponse
This object is only available in the Appstore SDK plugin.
string requestIdThe request ID originally returned by VerifyLicense.
string statusLicense status of the app. One of LICENSED, NOT_LICENSED, EXPIRED, ERROR_VERIFICATION, ERROR_INVALID_LICENSING_KEYS, UNKNOWN_ERROR. For details, see License Statuses.
NotifyFulfillmentInputstring receiptIdA receipt ID is a unique identifier of a purchase and is returned as part of the purchase response.
string fulfillmentResultEither FULFILLED or UNAVAILABLE. FULFILLED means the app successfully fulfilled the purchase. Calling with this status forces the Amazon Appstore to mark this purchase as successfully completed. UNAVAILABLE means the purchase can never be fulfilled by the app. Calling with this status forces the Amazon Appstore to cancel the purchase.
ProductDatastring skuThe SKU of the purchase.
string productTypeThe type of product. Can be CONSUMABLE, ENTITLED or SUBSCRIPTION. See Understanding In-App Purchasing for more information.
string priceThe price of the product, including the currency symbol and the numerical value. In the case of a subscription parent product, this is null.
string titleThe localized title of the product. If no title for the locale, returns the default (English).
string descriptionThe localized description of the product. If no description for the locale, returns the default (English).
string smallIconUrlThe URL of the small icon.
ProductDataMapkey: string skuA map using a SKU as the key and a ProductData object as the value.
value: ProductData productData
PurchaseReceiptstring receiptIdA receipt ID, which is a unique identifier of a purchase.
long cancelDateThe cancel date for the purchase, in milliseconds since January 1, 1970, 00:00:00 GMT, or 0 if it is not canceled.
long purchaseDateThe purchase date for the purchase, in milliseconds since January 1, 1970, 00:00:00 GMT.
string skuThe SKU of the purchase. In the case of subscriptions, this SKU represents the subscription, not a specific term. Examine the PurchaseDate and CancelDate to determine the start and end dates of the subscription.
string productTypeThe type of product. Can be CONSUMABLE, ENTITLED or SUBSCRIPTION. See Understanding In-App Purchasing for more information.
PurchaseResponsestring requestIdThe request ID originally returned by Purchase.
AmazonUserData amazonUserDataSee AmazonUserData.
PurchaseReceipt purchaseReceiptSee PurchaseReceipt.
string statusOne of SUCCESSFUL, NOT_SUPPORTED, FAILED, INVALID_SKU, or ALREADY_PURCHASED. SUCCESSFUL indicates a successful request. NOT_SUPPORTED indicates this call is not supported. FAILED indicates an unsuccessful request. INVALID_SKU indicates that the SKU originally provided to the Purchase operation is not valid. ALREADY_PURCHASED indicates that the customer already owns the provided SKU.
RequestOutputstring requestIdA unique ID of an in-app purchasing request.
ResetInputboolean resetSet to true to get a list of all purchases. Set to false to get a list of all purchases made since the last invocation.
SkuInputstring skuA SKU is a unique identifier for a purchasable product. A SKU is unique to each developer account with the Amazon Appstore. It is a case-sensitive string containing only alphanumerics, underscores, periods, and dashes. It must be 150 characters or less.
SkusInputList <string> skusA list of SKUs.
Last modified on January 21, 2022