CurrentApp.RequestProductPurchaseAsync CurrentApp.RequestProductPurchaseAsync CurrentApp.RequestProductPurchaseAsync CurrentApp.RequestProductPurchaseAsync CurrentApp.RequestProductPurchaseAsync Method

Definition

Overloads

RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String)

Requests the purchase of an add-on (also called an in-app product or IAP). Additionally, calling this method displays the UI that is used to complete the transaction via the Microsoft Store.

RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean)

Note

[RequestProductPurchaseAsync(String, Boolean) may be altered or unavailable for releases after Windows 8.1. Instead, use RequestProductPurchaseAsync(String).

Requests the purchase of an add-on (also called an in-app product or IAP). Additionally, calling this method displays the UI that is used to complete the transaction via the Microsoft Store.

RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties)

Requests the purchase of an add-on (also called an in-app product or IAP). Additionally, calling this method displays the UI that is used to complete the transaction via the Microsoft Store. This overload includes parameters you can use to display details for a specific offer within a large catalog of in-app purchases that is represented by a single product entry in the Store.

RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String)

Requests the purchase of an add-on (also called an in-app product or IAP). Additionally, calling this method displays the UI that is used to complete the transaction via the Microsoft Store.

public : static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(Platform::String productId)
static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(winrt::hstring productId) const;
public static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(String productId)
Public Shared Function RequestProductPurchaseAsync(productId As String) As IAsyncOperation(Of PurchaseResults)
Windows.ApplicationModel.Store.CurrentApp.requestProductPurchaseAsync(productId).done( /* Your success and error handlers */ );

Parameters

productId
String String String

The product ID of the add-on to purchase.

Returns

Remarks

The product ID is the string that the app uses to identify the add-on. You enter the product ID when submitting your add-on in Partner Center, where it is associated with the description, price tier and lifetime. For more information, see How to use product IDs for add-ons in your code.

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

See also

RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean)

Note

[RequestProductPurchaseAsync(String, Boolean) may be altered or unavailable for releases after Windows 8.1. Instead, use RequestProductPurchaseAsync(String).

Requests the purchase of an add-on (also called an in-app product or IAP). Additionally, calling this method displays the UI that is used to complete the transaction via the Microsoft Store.

public : static IAsyncOperation<Platform::String> RequestProductPurchaseAsync(Platform::String productId, bool includeReceipt)
static IAsyncOperation<winrt::hstring> RequestProductPurchaseAsync(winrt::hstring productId, bool includeReceipt) const;
public static IAsyncOperation<string> RequestProductPurchaseAsync(String productId, Boolean includeReceipt)
Public Shared Function RequestProductPurchaseAsync(productId As String, includeReceipt As Boolean) As IAsyncOperation(Of string)
Windows.ApplicationModel.Store.CurrentApp.requestProductPurchaseAsync(productId, includeReceipt).done( /* Your success and error handlers */ );

Parameters

productId
String String String

The product ID of the add-on to purchase.

includeReceipt
Boolean Boolean Boolean

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

Returns

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.

Remarks

The remarks for RequestProductPurchaseAsync(String) also apply to this overload.

To confirm whether the product license is active after a successful call to this overload, use the LicenseInformation.IsActive property.

See also

RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties)

Requests the purchase of an add-on (also called an in-app product or IAP). Additionally, calling this method displays the UI that is used to complete the transaction via the Microsoft Store. This overload includes parameters you can use to display details for a specific offer within a large catalog of in-app purchases that is represented by a single product entry in the Store.

public : static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(Platform::String productId, Platform::String offerId, ProductPurchaseDisplayProperties displayProperties)
static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(winrt::hstring productId, winrt::hstring offerId, ProductPurchaseDisplayProperties displayProperties) const;
public static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(String productId, String offerId, ProductPurchaseDisplayProperties displayProperties)
Public Shared Function RequestProductPurchaseAsync(productId As String, offerId As String, displayProperties As ProductPurchaseDisplayProperties) As IAsyncOperation(Of PurchaseResults)
Windows.ApplicationModel.Store.CurrentApp.requestProductPurchaseAsync(productId, offerId, displayProperties).done( /* Your success and error handlers */ );

Parameters

productId
String String String

The product ID of the add-on to purchase.

offerId
String String String

The specific in-app feature or content within the large purchase catalog represented on the Microsoft Store by the productId. This value correlates with the content your app is responsible for fulfilling. The Microsoft Store only uses this value to itemize the PurchaseResults.

displayProperties
ProductPurchaseDisplayProperties ProductPurchaseDisplayProperties ProductPurchaseDisplayProperties

The name of the app feature or content offer that is displayed to the user at time of purchase.

Returns

Remarks

The remarks for RequestProductPurchaseAsync(String) also apply to this overload.

See also