Information
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.

CurrentApp.RequestProductPurchaseAsync(String) | requestProductPurchaseAsync(String) method

Applies to Windows and Windows Phone

Requests the purchase of an in-app product. Additionally, calling this method displays the UI that is used to complete the transaction via the Windows Store.

Syntax


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

Parameters

productId

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

Specifies the id of the in-app product.

Return value

Type: IAsyncOperation<PurchaseResults>

The results of the in-app product purchase request.

Remarks

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.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

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

Metadata

Windows.winmd

See also

CurrentApp
RequestProductPurchaseAsync(String, Boolean)

 

 

Show:
© 2014 Microsoft