The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CurrentAppSimulator.RequestProductPurchaseAsync(String, Boolean) | requestProductPurchaseAsync(String, Boolean) method

Applies to Windows and Windows Phone

[RequestProductPurchaseAsync(productId, includeReceipt) may be altered or unavailable for releases after Windows 8.1. Instead, use RequestProductPurchaseAsync(productId).]

Creates the async operation that displays the UI that is used to simulate an in-app purchase of content or a feature from the Windows Store.


Windows.ApplicationModel.Store.CurrentAppSimulator.requestProductPurchaseAsync(productId, includeReceipt).done( /* Your success and error handlers */ );



Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

Specifies the id, as defined by the simulation, of the product or feature to buy.


Type: Boolean [JavaScript] | System.Boolean [.NET] | Platform::Boolean [C++]

Determines if the method should return the receipts for the specified productId.

Return value

Type: IAsyncOperation<String>

A string providing in-app transaction details for the provided productId. If includeReceipt is set true, the returned string will include a full receipt xml.


Uses the CurrentApp/ListingInformation/Product element in the WindowsStoreProxy.xml file with the ProductId attribute that matches ProductId as the data source for the members of the returned object. If the purchase transaction succeeds, the license state is updated only in memory. The contents of WindowsStoreProxy.xml are not changed.For more info, see the code examples in CurrentAppSimulator.

Use the LicenseInformation.IsActive property to confirm that a product license is active after a "successful" RequestProductPurchaseAsync call.

Note  This method of confirming a successful purchase is only applicable to the RequestProductPurchaseAsync overloads that don't return a PurchaseResults object.

You can see an example of how to use this method in our code sample.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]


Windows::ApplicationModel::Store [C++]



See also




© 2014 Microsoft