ProductLicense ProductLicense ProductLicense Class


Provides info about a license that is associated with an add-on (also called an in-app product or IAP).

public sealed class ProductLicense : IProductLicense, IProductLicenseWithFulfillmentpublic sealed class ProductLicense : IProductLicense, IProductLicenseWithFulfillmentPublic NotInheritable Class ProductLicense Implements IProductLicense, IProductLicenseWithFulfillment
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


The ProductLicenses property of the LicenseInformation object contains one or more instances of this object.


The following code example demonstrates how to use this object to get the expiration date of an add-on offer.

// get current app object using the simulator interface
currentApp = Windows.ApplicationModel.Store.CurrentAppSimulator;

// get the license information object
licenseInformation = CurrentAppSimulator.licenseInformation;

// get info about the licenses of the app's in-app offers
inAppOfferLicenses = licenseInformation.productLicenses;

// get the license information for a specific in-app offer
myFavoriteInAppOffer = inAppOfferLicenses("MyFavoriteInAppOffer");

// and look up the offer's expiration date
// get the license info for this app from the simulator
LicenseInformation licenseInformation = CurrentAppSimulator.LicenseInformation;

// get the license info for one of the app's in-app offers
ProductLicense inAppOfferLicense =

// get the expiration date of this in-app offer
DateTimeOffset expirationDate = inAppOfferLicense.ExpirationDate;


ExpirationDate ExpirationDate ExpirationDate

Gets the current expiration date and time of the add-on (also called an in-app product or IAP) license.

public DateTime ExpirationDate { get; }public DateTimeOffset ExpirationDate { get; }Public ReadOnly Property ExpirationDate As DateTimeOffset
DateTime DateTime DateTime

The date and time indicating when the add-on license expires.


IsActive IsActive IsActive

Indicates if the add-on (also called an in-app product or IAP) license is currently active.

public bool IsActive { get; }public bool IsActive { get; }Public ReadOnly Property IsActive As bool
bool bool bool

Returns true if the add-on's license is active, and otherwise false. This property can return false if the license is missing, expired, or revoked.


IsConsumable IsConsumable IsConsumable

Indicates if the add-on (also called an in-app product or IAP) is consumable. A consumable add-on can be purchased, used, and purchased again.

public bool IsConsumable { get; }public bool IsConsumable { get; }Public ReadOnly Property IsConsumable As bool
bool bool bool

true if the add-on is a consumable add-on; Otherwise, false.


ProductId ProductId ProductId

Gets the ID of an add-on (also called an in-app product or IAP). This ID is used by the app to get info about the product or feature that is enabled when the customer buys it through an in-app purchase.

public string ProductId { get; }public string ProductId { get; }Public ReadOnly Property ProductId As string
string string string

The ID specified in the Windows Dev Center dashboard to identify this add-on.



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 the Windows Dev Center dashboard, where it is associated with the description, price tier and lifetime.

See Also