question

pedro-1 avatar image
pedro-1 asked

Economy v2 Real Money purchase with Steam

I'm having a hard time understanding what PlayFab is supposed to do on a real money purchase, what the Steam manager is supposed to do, and what I am supposed to do.

The flow I have in mind is:

  1. The user clicks a button to purchase something. I call PurchaseInventoryItemsRequest with the item I want to purchase, this item is configured as a bundle with items assigned, marketplace mapping to Steam, and a FriendlyId made by me (no price?).

  2. PlayFab opens the Steam overlay with the item that the user wants to purchase, which is already configured on Steam's side with the same id as in the marketpalce mapping.

  3. If the item is purchased by the user, it is added to their inventory, and now all I have to do is call RedeemSteamInventoryItems to confirm if the items were indeed purchased.

But this is either wrong or I'm doing something wrong, if I don't add a price to the item, I get an error 1071 saying that the item is not purchasable, if I do add a price I get a bad request, I'm assuming this is because the player doesn't have that currency in their inventory, even though I tried using an RM currency created by me, since there is no default RM in CurrencyV2.

Am I doing something wrong? I've been stuck on this for far too long and the docs are nto very clear about this.

In-Game Economy
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Infer Wang avatar image
Infer Wang answered

You do not need to specify a price for the item in PlayFab, as it will use the price configured on Steam’s side. However, you need to make sure that the item has a valid marketplace mapping to Steam, and that the FriendlyId matches the product ID on Steam. You also need to listen for the callback from Steam that tells you the purchase was authorized, and then call RedeemSteamInventoryItems with the OrderId that Steam provides. This will grant the item to the user’s inventory in PlayFab. You may refer to this post.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.