Hi,
I am trying to scope out what the order of operations and associated API calls are that are required to make a real money purchase through Steam. I am trying to do this using Economy V2 since it's now the recommended approach for new titles to take.
From reading the Steam documentation for IAP (found here https://partner.steamgames.com/doc/features/microtransactions/implementation), I see the flow Steam expects is:
- The client will contact the game Backend (in our case, PlayFab of course), informing it of what it wants to purchase.
- The Backend will then call Steam's ISteamMicroTxn/InitTxn API to initiate the purchase. The Steam Client running the game will now display the purchase overlay and the user will go through the steps of purchasing.
- Once complete (assuming the user authorized), the client is then meant to tell its Backend to "finalize" the transaction, passing along the OrderId that was just completed.
- The Item is then granted to the user by the Backend.
Assuming my understanding is correct here, it is unclear to me exactly how the Economy V2 API maps to this. I am guessing/assuming, it would go like this:
- A call to PurchaseInventoryItems is made from the client on behalf of the player. From reading other threads on here, presumably we need to be purchasing a Bundle since that's the only type that can be mapped to an external store Id.
- PlayFab will then take care of calling ISteamMicroTxn/InitTxn on our behalf.
- The client listens for the callback telling it the player has authorized the purchase. After this, the next part isn't clear to me in terms of what we're meant to call on the PlayFab side. I assume it should be RedeemSteamInventoryItems. If so, there does not seem to be a field to specify the OrderId that the steam documentation says is needed for this step. Is this the wrong API that I'm expecting we should call here? Or, is PlayFab caching the OrderId itself, and not requiring it?
- Presumably the item is the granted to the user's Inventory by PlayFab
Can you help me understand/confirm whether the API calls in 1 and 3 are what we should be calling, and help clear up some of the confusion around how step 3 is intended to work?
Also, if this is correct, how does the call to PurchaseInventoryItems know to contact Steam - i.e. what dictates that it's a Steam purchase and not a different platform? Does it just know this based on how the user logged in for this session (i.e. he's logged in to PlayFab via Steam), or does the Bundle need to have exactly 1 external store mapping?
Thanks for any help you can offer