Vector4Games avatar image
Vector4Games asked

Questions on switching from Unity to Playfab services (IAP especially)

Hi there,

I'm nearing the end of the development cycle for my first Unity game. The aim is to target Windows (UWP) first, then Android, then iOS. The game is currently using Unity Analytics, IAP & Remote Settings. I've abstracted out each service class as below, the idea being it would be simple to replace the Unity layers if needed...

IAPManager -> UnityIAPManager -> BaseIAPManager

But I've hit a few issues\limitations on the way and am thinking of making a late switch to Playfab. Upon looking at the Playfab documentation online, I'm a little confused as to what Playfab is able to offer in regards to IAP.

With Unity's service, I setup the product catalogue locally (and in each app store) then make the required call (using InitiatePurchase to purchase the actual product). It means I don't have to learn (or deal with) the various platforms API's, only Unity's.

I had assumed Playfab's would work the same way (setting up a product catalogue, albeit online) then using PurchaseItem which would make all the magic happen (receipt validation aside)

But after digging around and looking at various tutorials, it seems this isn't the case? It looks like Playfab is more being used to track purchases (and handle receipt validation) but I will have to learn\use each platforms API to make the actual purchases (which would be a deal breaker for me)

Hopefully I'm wrong and am just misinterpreting the online docs. Any advice would be much appreciated.

apisIn-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

Citrus Yan avatar image
Citrus Yan answered

First of all, the PurchaseItem API is for Virtual Currency purchases, and yes, you’ll need to get familiar with each Platform’s APIs if you want to set up IAP using PlayFab, please read this tutorial to learn more: Getting started with PlayFab, Unity IAP, and Android.

In general, PlayFab Commerce Service is more like a centralized back-end management platform where you can handle purchases from all kinds of platforms and reflect them in the player’s inventory, therefore, you’ll need to implement IAPs on your own and then pass the receipt to PlayFab to handle purchases.

1 comment
10 |1200

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

Vector4Games avatar image Vector4Games commented ·

Thanks Citrus. That's a real shame as it rules out Playfab for me at the moment. Shame as I really liked what I saw. Are there any plans for a local (or server based) cross platform IAP solution on the roadmap?

0 Likes 0 ·

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.