Methods and events
You can initiate method calls and listen for events. Method calls initiate requests, some of which return a response. Events are asynchronous system-generated messages that are sent in response to method calls to return the requested data to you. All of the method calls, except forNotifyFulfillment, request data from the system. When you initiate a request for data, the system immediately returns an object containing a requestId string, which is a unique request identification string. The requested data is returned asynchronously via an event. The NotifyFulfillment method call does not return a response because its purpose is to notify Amazon that your app has delivered the purchased item to the user.
To get the data contained in an event, you must define a handler function and bind it to an event listener for the specific type of event. The returned data, accessible from within your event handler, includes a unique requestId that matches the requestId that was returned in the request method call. You can use the requestIds to match a specific request to a specific response, if necessary.
Initiate method calls in Unity
To initiate a method call, you must perform the following general steps:- Construct the object used to interact with the plugin.
- If needed, construct the object used to pass input to the operation.
- For asynchronous operations, define a callback function that is invoked when a response is ready.
- Call the operation, passing in any required input and/or callback function as arguments.
GetUserData
GetUserData initiates a request to retrieve the user ID and marketplace of the currently logged-in user.
Purchase
Purchase initiates a purchase flow for a product.
GetProductData
GetProductData initiates a request to retrieve item data for up to 100 SKUs.
GetPurchaseUpdates
GetPurchaseUpdates initiates a request to retrieve updates about items the customer has purchased and/or cancelled.
NotifyFulfillment
NotifyFulfillment notifies Amazon about the purchase fulfillment.
VerifyLicense
VerifyLicense initiates the request to verify the license. It is an asynchronous function.GetAppstoreSDKMode
GetAppstoreSDKMode Returns the AppstoreSDK operating mode.Handle events in Unity
To handle an event, you must perform the following general steps:- Construct the object used to interact with the plugin.
- Define an event handler.
- Register your event handler with an event listener.
GetUserDataResponse
GetUserDataResponse returns the response from the GetUserData call.
PurchaseResponse
PurchaseResponse returns the response from the Purchase call.
GetProductDataResponse
GetProductDataResponse returns the response from the GetProductData call.
GetPurchaseUpdatesResponse
GetPurchaseUpdatesResponse returns the response from the GetProductData call.

