Thanks for reaching out!
You’re encountering issues retrieving purchase information for your subscription with the windows_iap package in your Windows Flutter app. Here are some things you might want to check and try out:
1.Access Token and ServiceTicket: Ensure that the access token you are receiving is valid and has the necessary scopes for accessing purchase information. You seem to be using the correct method to fetch the token, but it’s crucial to confirm that the token is being generated correctly.
2.User Identity: Make sure that the publisherUserId you're passing (the user's email) is accurately tied to the purchases made. Sometimes, discrepancies in user identity can lead to no data being returned.
3.Query the Purchase ID: Use the method GetCustomerPurchaseIdAsync with a valid serviceTicket and publisherUserId to query the purchase. If the purchase is found, you should receive the customer purchase ID. If you're consistently getting empty results, double-check that the purchase was properly completed and that you’re querying the right user.
4.Multiple States of Subscription: Understand the states of the subscription; if it's inactive, canceled, or failed, you may not get the expected results and could require a re-purchase. Here’s a brief on relevant states:
-
Active: Valid subscription.-
Inactive / Canceled / Failed: Not entitled to benefits. -
InDunning: Subscription nearing expiration but still valid if within grace period.- Delay in Updates: Sometimes there may be a delay in updating the status of subscriptions, so if you just purchased, give it a few minutes to sync across systems, and then try again.
6.Check the API Documentation**: Double-check the Microsoft Store APIs documentation for any specific response or error handling mechanisms outlined.
-
Let me know if you need any further help with this. I will be happy to assist.
If you find this helpful, Kindly mark the provided solution as "Accept Answer", so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.