StoreContext.ReportConsumableFulfillmentAsync(String, UInt32, Guid) StoreContext.ReportConsumableFulfillmentAsync(String, UInt32, Guid) StoreContext.ReportConsumableFulfillmentAsync(String, UInt32, Guid) StoreContext.ReportConsumableFulfillmentAsync(String, UInt32, Guid) StoreContext.ReportConsumableFulfillmentAsync(String, UInt32, Guid) Method

Definition

Reports a consumable add-on for the current app as fulfilled in the Microsoft Store.

public : IAsyncOperation<StoreConsumableResult> ReportConsumableFulfillmentAsync(Platform::String productStoreId, unsigned int quantity, Platform::Guid trackingId)
IAsyncOperation<StoreConsumableResult> ReportConsumableFulfillmentAsync(winrt::hstring productStoreId, uint32_t quantity, Guid trackingId) const;
public IAsyncOperation<StoreConsumableResult> ReportConsumableFulfillmentAsync(String productStoreId, UInt32 quantity, Guid trackingId)
Public Function ReportConsumableFulfillmentAsync(productStoreId As String, quantity As UInt32, trackingId As Guid) As IAsyncOperation(Of StoreConsumableResult)
Windows.Services.Store.StoreContext.reportConsumableFulfillmentAsync(productStoreId, quantity, trackingId).done( /* Your success and error handlers */ );

Parameters

productStoreId
String String String

The Store ID of the consumable add-on that you want to report as fulfilled.

quantity
UInt32 UInt32 UInt32

The number of units of the consumable add-on that you want to report as fulfilled. For a Store-managed consumable (that is, a consumable where Microsoft keeps track of the balance), specify the number of units that have been consumed. For a developer-managed consumable (that is, a consumable where the developer keeps track of the balance), specify 1.

trackingId
Guid Guid Guid

A developer-supplied GUID that identifies the specific transaction that the fulfillment operation is associated with for tracking purposes. For more information, see the remarks.

Returns

An asynchronous operation that, on successful completion, returns a StoreConsumableResult object that contains info about the fulfillment operation, such as the remaining balance of add-on units.

Remarks

After the user has used a consumable add-on in your app, use this method to report the add-on as fulfilled in the Microsoft Store. The Store ID for the add-on is available in Partner Center, and it is returned by the StoreId property of the StoreProduct that represents the add-on. For more information about using this method, including a code example, see Enable consumable add-on purchases.

The trackingId parameter is used to help ensure that each fulfillment operation is handled exactly once by the Microsoft Store. For example, consider a scenario where you call ReportConsumableFulfillmentAsync with a given pair of productStoreId and trackingId values, the Microsoft Store successfully marks the consumable as fulfilled, but there is a network connectivity issue that prevents your app from receiving and handling the response. The next time your app retries the same ReportConsumableFulfillmentAsync call with the same pair of productStoreId and trackingId values after it regains connectivity, the Microsoft Store will report the transaction as successful without charging the user again. The trackingId parameter can be retrieved via the TrackingId property of the StoreConsumableResult return value.

See also