How to Parse Durable Purchase Receipt in UWP

Jay 140 Reputation points
2025-01-01T07:23:39.49+00:00

Hi, I have created two add-ons: one is a Durable product, and the other is a Subscription product. I successfully received receipts for both during purchase. As per the documentation, I parsed the receipt for the Subscription product and retrieved the necessary data. However, I am unable to get receipt data for the Durable product. Is there any other way to parse the receipt for a Durable product? Could you please help?

https://learn.microsoft.com/en-us/windows/uwp/monetize/get-subscriptions-for-a-user

Developer technologies | Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Harry Vo (WICLOUD CORPORATION) 1,315 Reputation points Microsoft External Staff
    2025-08-15T06:59:27.1+00:00

    Hi @Jay

    My name is Harry, Support Engineer who specialize in UWP (Universal Windows Platform). Thank you for reaching out on Microsoft Q&A!

    Unlike subscriptions, durable add-ons are one-time purchases with no expiration date, so the receipt content is much more limited. For durable products, the recommended approach is to call the Query for Products API rather than parsing the receipt payload directly.

    About the error:

    {	"code":"Unauthorized",
    	"data":[],
    	"details":[],
    	"innererror":
    	{	"code":"AuthenticationTokenInvalid",
    		"data":["B2B key"],
    		"details":[],
    		"message":"Authentication token supplied is invalid"},
    		"message":"The client is not authorized to perform the requested operation."
    		,"source":"CollectionsFD"
    	}
    }
    

    There are a few things I suggest:

    1. Check your authentication setup – The AuthenticationTokenInvalid error and “B2B key” message indicate the token you’re sending may be missing required permissions or is not generated with the correct credentials. Review your Azure AD app registration and ensure the key is correct, active and associated with the Partner Center account.
    2. Test in sandbox – Purchase a durable add-on in the sandbox environment, use the generated receipt with the correct auth token, and confirm that the Query API returns the product details.

    I hope this helps you get things back on track quickly! If my suggestions can solve your issue, feel free to interact with the system accordingly!

    Thank you!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.