Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 2.05 KB

currentapp_getcustomerpurchaseidasync_530605295.md

File metadata and controls

31 lines (22 loc) · 2.05 KB
-api-id -api-type
M:Windows.ApplicationModel.Store.CurrentApp.GetCustomerPurchaseIdAsync(System.String,System.String)
winrt method

Windows.ApplicationModel.Store.CurrentApp.GetCustomerPurchaseIdAsync

-description

Retrieves a Microsoft Store ID key that can be used to grant entitlements for free products on behalf of the current user.

-parameters

-param serviceTicket

An Azure Active Directory access token that identifies the publisher of the current app. For more information about generating this token, see Manage product entitlements from a service.

-param publisherUserId

An anonymous ID that identifies the current user in the context of services that you manage as the publisher of the current app. If you maintain user IDs in the context of your services, you can use this parameter to associate your ID for the current user with the new Microsoft Store ID key (the user ID will be embedded in the key). Otherwise, if you don't need to associate a user ID with the Microsoft Store ID key, you can pass any string value.

-returns

The purchase ID key for the current user. This key is valid for 90 days.

-remarks

Publishers with catalogs of in-app purchases can use the Microsoft Store ID key in service-to-service calls to the Microsoft Store purchase API to grant entitlements for free products on behalf of the current user. An entitlement represents the customer's right to use an app or in-app product (IAP) that is published through the Microsoft Store. For more information, see Manage product entitlements from a service.

-examples

-see-also

Manage product entitlements from a service,Store sample