Forum Discussion

ttroyer's avatar
ttroyer
Copper Contributor
Apr 29, 2025

Microsoft Store Service APIs v9.0 publisherQuery - Uniquely identifying user subscription

I'm working on a WPF app that will be published to the Windows Store.  It supports an add-on monthly subscription.  That subscription comes with consumable credits for using my app.  Per user, per month, I want to track the user's credit balance.

I'm using the following Microsoft Store Service API endpoint to get the user's subscription details from my backend service:

collections.mp.microsoft.com/v9.0/collections/publisherQuery

Here's an example response (with identifying information replaced with fake data):

{
  "ContinuationToken": null,
  "Items": [
    {
      "RecurrenceId": null,
      "AcquiredDate": "2025-04-28T20:34:54.2761169+00:00",
      "AcquisitionType": "Recurring",
      "EndDate": "2025-05-31T00:00:00+00:00",
      "Id": "11111111111122222222222333333333",
      "ModifiedDate": "2025-04-28T20:34:54.277868+00:00",
      "ProductId": "AAAAAAAAAAAA",
      "ProductKind": "Durable",
      "Quantity": 1,
      "SatisfiedByProductIds": [],
      "SkuId": "0020",
      "StartDate": "2025-04-28T00:00:00+00:00",
      "Status": "Active",
      "Tags": [],
      "TransactionId": "11111111-1111-1111-1111-111111111111",
      "TrialData": {
        "IsInTrialPeriod": false,
        "IsTrial": false,
        "TrialTimeRemaining": "00:00:00"
      }
    }
  ]
}

 

Based on this response, I can see there's an active subscription, with the start and end date.  I'm trying to determine whether anything in this response uniquely represents this user's subscription for this month, and could be used as my own identifier when tracking user credit consumption.

It looks like Id and TransactionId are the only two potential candidates, but I don't know for certain that I can count on either of these for this scenario.  Can anyone confirm?  Is there some altogether better approach I should be using?

No RepliesBe the first to reply

Resources