question

xigmasuji avatar image
xigmasuji asked

Economy V2 - How to grant currency or bundle to player with real money using unity and google play store

I have simple steps to purcahse some in app purchase in my game in unity. using unity's IAP I want to use RedeemGooglePlayInventoryItems to validate the purchase and grant player the items from playfab catalog. I have gems and coins current which I would like the player to have with real money.

I can use PurchaseInventoryItems api to purchase the items with in game currency like buying coins with gems.

But I couldn't find a way to validate and then grant player the item with real money.

there is a option of Marketplace mapping in the store, will that work somehow?

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

·
Xiao Zha avatar image
Xiao Zha answered

For Google Play real money purchase in Economy V2, you should use RedeemGooglePlayInventoryItems API. You may refer to Marketplace integration - Google - PlayFab | Microsoft Learn to integrate the Google Play Marketplace with PlayFab. Then refer to Redemption with the Google Marketplace - PlayFab | Microsoft Learn to create PlayFab bundle, add it to your game in the Google Marketplace and redeem the items for players. In addition, here is the IAP code example using RedeemGooglePlayInventoryItems API, you may refer to Getting started with Economy v2, Unity IAP, and Android - PlayFab | Microsoft Learn. And the RedeemGooglePlayInventoryItems API will automatically add the item to the player’s inventory after successfully validate the receipt.

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.