Tommy Li suggested an idea · May 04, 2020 at 03:17 AM · Player InventoryapisIn-Game Economy
This is a follow-up on a previous discussion: https://community.playfab.com/questions/8889/protection-from-iap-cancellations.html @Brendan
While it is true that we developers can check for IAP cancellations locally, it is actually impossible to revoke items accurately. The problem is that we don't have access to a PlayFab player's full purchase history via any API (although we can see all of those using the developer dashboard), so we are not able to match purchases in a receipt with items in a player's inventory, because there is no way to match transaction IDs. PlayFab also said previously that they have no interest in providing such API because of cost: https://community.playfab.com/questions/12944/get-purchases-made-by-user-on-cloudscript-server-a.html
So instead of providing all the transaction history, I'm proposing several solutions that can satisfy the need to revoke items safely
1. Bare Minimum: A new Client API that allows developer to provide a transaction ID (as recorded in IAP receipt, determined locally). If PlayFab finds a previously accepted transaction with the exact ID, PlayFab revokes the item related to that transaction. If there is no match, do nothing.
2. Parse receipt on server: Do item 1, but instead of the developer parses the receipt in Client code to determine refund status, PlayFab does that on its end and developer provides the receipt.
I believe by doing so, PlayFab can still keep the cost controlled.
To be clear, we didn't say we have no interest in providing an API that returns the details (items, etc.) of every purchase the player ever made. We were highlighting that it's not technically possible, since some of the required information would be outside the retention period for the game. The transaction IDs in receipts from Apple and Google are stored for all time, in order to prevent replay attacks. So an API to check that would be possible, and we can add that to the backlog.
Hi @Brendan, may I know if any progress has been made on this matter?
I'd recommend keeping an eye on our roadmap page: https://docs.microsoft.com/en-us/gaming/playfab/roadmap/
We update that with information on new features that are planned, so that developers have a clear picture of what's coming. As things are today, if a feature request is not something we're hearing from a significant portion of our developer community (in part reflected in the number of likes on a feature request), it's unlikely it is going to get into our schedule.
We do have a new commerce service coming into preview later this year though, so I'd recommend having a look at it as soon as it's available.
We would love to know what you need. Submit your ideas and upvote others to help us prioritize.
ModifyItemUses to multiple instances in one request.
Allow annotation/custom tags on all PlayFab commands
New kind of inventory item: Entitlement/unlock/enablement/singleton items
ClientAPI for changing DisplayName of inventory ItemInstances
Ability to make VC per player not as Global
RedeemCoupon - Request to return currency
Is Friend Online ? Provide API to get last player activity timestamp.