CurrentApp.RequestAppPurchaseAsync | requestAppPurchaseAsync method

Requests the purchase of a full app license.


static IAsyncOperation<String^>^ RequestAppPurchaseAsync(
  bool includeReceipt



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

Determines if this method should return the receipts for this app.

Return value

Type: IAsyncOperation<String>

If the includeReceipt parameter is set to true, this string contains XML that represents all receipts for the app and any in-app purchases. If includeReceipt is set to false, this string is empty.


This method returns a success value even if:

  • there's no network connection available
  • the user cancels out of the dialog
  • the user's authentication fails
You should treat a success result as indicating the async process completed without errors. To ensure that the transaction itself was successful, check the LicenseInformation element in the returned receipt.

The XML-formatted string that this method returns uses these elements:

Element NameDescriptionChild ElementsAttributes
ReceiptContains information about app and in-app product purchases




Version: The version number of the receipt.

CertificateId: The certificate thumbprint used to sign the receipt.

ReceiptDate: Date the receipt was signed and downloaded.

ReceiptDeviceId: Identifies the device used to request this receipt.

AppReceiptContains information about an app purchase.None.

Id: Identifies the purchase.

AppId: The Package Family Name value that the OS uses for the app.

LicenseType: Full, if the user purchased the full version of the app. Trial, if the user downloaded a trial version of the app.

PurchaseDate: Date when the app was acquired.

ProductReceiptContains information about in-app product purchases.None.

Id: Identifies the purchase.

AppId: Identifies the app through which the user made the purchase.

ProductId: Identifies the product purchased.

ProductType: Determines the product type. Currently only supports a value of Durable.

PurchaseDate: Date when the purchase occurred.

SignatureContains the signature for the receipt and information on how the receipt was digitally signed.



This element is a standard XML-DSIG construct. It contains a SignatureValue element, which contains the signature you can use to validate the receipt.


To verify a receipt's authenticity, you can check the receipt's signature using the public certificate. To get this certificate, use the following URL:<CertificateId>

where <CertificateId> is the CertificateId of the receipt.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0


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



Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

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


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



See also




© 2015 Microsoft