1

I have an app that is configured as follows in the Microsoft App Store:

Markets: 241

Visibility: Public Audience - Make the project available but not discoverable in the Microsoft Store and: Direct Link only: Any customer with a direct link .....

Schedule: This product will be available to customers as soon as possible.

Base Price: Free

Free Trial: Time-limited 30 days.

I then have different subscription add-ons for the app as follows: enter image description here

I have the 30 Day subscription configured as follows (just to see if it made a difference from the other ones)

Subscription Period: Monthly

Free Trial: One month

Market: Available in 241 Markets

Visibility: Public - Can be displayed in the parent product's Microsoft Store listing. (Note this is what is different with this subscription versus the rest.)

Release: As soon as possible

Base Price: Free (so I can test without having to purchase it)

The other subscriptions are configured as follows:

Subscription Period: 3 months, 6 months or 12 months

Free Trial: No free trial

Market: Available in 241 Markets

Visibility: Public - Hidden in the Microsoft Store and: Available for purchase within the parent app only.

Release: As soon as possible

Base Price: Free (so I can test without having to purchase it)

Below is what the overview screen looks like in the Partner Center

The challenge is that when I try to get the available Add-ons for my app nothing comes back. Below is the code I am running:

private StoreContext UWPStoreContext;
UWPStoreContext = StoreContext.GetDefault();

string[] productKinds = { "Consumable", "Durable", "UnmanagedConsumable" };
List<String> filterList = new List<string>(productKinds);

StoreProductQueryResult queryResult = await UWPStoreContext.GetAssociatedStoreProductsAsync(productKinds);

And here is what the queryResults look like:

enter image description here

I am sure I just have something configured wrong but cannot seem to figure out what. What I expect to happen is that the queryResults will have my four subscription in it with their information from the store.

Any assistance would be greatly appreciated.

**** UPDATE ****

I am 99% sure I have associated the app in Visual Studio with the app from the app store. (I did the associate through the VS menu option - then downloaded the app from the app store via the link received from the App store and ran the app store version of the app once on my development machine. This process was based on the instructions from Microsoft that indicated how things should be set up to test.)

Also - I AM getting the application information using the line of code:

var tobj_ProductInfo =  await context.GetStoreProductForCurrentAppAsync();

In the tobj_ProductInfo object I see the following information:

enter image description here

I do not believe I would be getting this information if my project in Visual Studio were not associated with the app in the app store.

George M Ceaser Jr
  • 1,497
  • 3
  • 23
  • 52
  • Could you please use the code in the [here](https://learn.microsoft.com/en-us/windows/uwp/monetize/enable-subscription-add-ons-for-your-app#code-examples) that only defines durable? – Roy Li - MSFT Aug 10 '20 at 07:59
  • @RoyLi-MSFT this is exactly the same code I was using (you can see it in my sample above. Any way when I put the sample code in and ran it I got the exact same result. The result object from the call to await context.GetAssociatedStoreProductsAsync(new string[] { "Durable" }); was null and no products were returned. – George M Ceaser Jr Aug 10 '20 at 13:04
  • Could you please submit a subscription that doesn't have a trial period? – Roy Li - MSFT Aug 11 '20 at 08:24
  • @RoyLi-MSFT - please look at the post. I already have three subscriptions that do not have a trial period - the 3,6 and 12 month subscriptions don't have a trial period. – George M Ceaser Jr Aug 11 '20 at 11:05
  • I spent some time creating a test app and published it to the store. Then I submitted a subscription for the app. After that, I tested your code. But all the things seem to be correct. I could get the subscription information. Could you please double-check if your project has been associated with the correct app? And have you tried to create a new subscription to test? – Roy Li - MSFT Aug 13 '20 at 06:59
  • @RoyLi-MSFT - thanks for doing more investigating. I updated the question with more information regarding your question on associating the app with the product in the app store. My believe is I have something not configured correctly in the app store and that is why I can get the app information but not the add-ons. Could you look at how my addons and app are configure (as shown in my question) and tell me where they differ from the definitions of you app and add-ons in the store? – George M Ceaser Jr Aug 13 '20 at 14:05
  • I've checked the information you provided in the post. It should be correct as long as you followed the right document[Steps to enable a subscription add-on for your app](https://learn.microsoft.com/en-us/windows/uwp/monetize/enable-subscription-add-ons-for-your-app#steps-to-enable-a-subscription-add-on-for-your-app) when creating the add-ons. Could you please submit another durable add-on which is not a subscription and try to query using the same code? – Roy Li - MSFT Aug 14 '20 at 02:50
  • @RoyLi-MSFT Yes that was what I followed. I actually just tried submitting another one and will see if that shows up. I will let you know. Thanks – George M Ceaser Jr Aug 17 '20 at 14:44
  • @RoyLi-MSFT I added a new subscription following the links in the document above and the subscription still does not show in my app. – George M Ceaser Jr Aug 17 '20 at 17:20
  • I get some information from the team said that you've opened a support ticket about this. Since you have opened a support ticket against this question. Let's temporarily take this offline and wait for the team's response. – Roy Li - MSFT Aug 18 '20 at 02:49
  • @RoyLi-MSFT - sounds good. – George M Ceaser Jr Aug 18 '20 at 13:52
  • @RoyLi-MSFT so I to be clear I am trying to get the available subscriptions using the new namespace -- I forgot what it is. Regardless, after waiting TWO MONTH!!! The Microsoft techs have finally informed me being able to get the available subscriptions from my actual app and purchasing through my app (using the store of course) is not supported. Which really begs the question how you got it to work. Anyway I am going to post an answer with the information from Microsoft. – George M Ceaser Jr Oct 12 '20 at 22:10
  • 1
    @GeorgeMCeaserJr In my case, Subscription-based add-ons are returning as Durable add-ons. – Aasish Dec 29 '20 at 17:52

1 Answers1

2

So -- Through the support ticket I opened with support, I have now received information that purchasing an add-on subscription through an app from the App Store is actually not supported. My Ticket number is 120081121001365 and that is where all of this should be documented. I hope no one else wastes their time with Microsoft Subscriptions like I have.

UPDATE!!! Well finally Microsoft has admitted there is a defect in their store and it is not returning the required / documented information when the billing APIs are called. According the person monitoring my ticket, they are working on getting it fixed. Once they have published the fix I will post here so everyone knows.

UPDATE AGAIN!! I don't know what happened but now I am getting all of my add-on products back from the store. One interesting thing I noted now (See code below for what I am referring to) is that in the code below - queryresults will still show as not having a value in the debugger. However, when you loop through the products collection, the add-on products are there.

        string[] productKinds = { "Durable", "Consumable", "UnmanagedConsumable" };
        List<String> filterList = new List<string>(productKinds);

        StoreProductQueryResult queryResult = await context.GetAssociatedStoreProductsAsync(filterList);

        if (queryResult.ExtendedError != null)
        {
            // The user may be offline or there might be some other server failure.
            is_Result = $"ExtendedError: {queryResult.ExtendedError.Message}";
            return;
        }

        foreach (KeyValuePair<string, StoreProduct> item in queryResult.Products)
        {
            // Access the Store product info for the add-on.
            StoreProduct product = item.Value;

            // Use members of the product object to access listing info for the add-on...
        }

I hope this helps someone else.

George M Ceaser Jr
  • 1,497
  • 3
  • 23
  • 52