question

brendan avatar image
brendan asked

Purchasing Items using Real World Money

facelessj
started a topic on Wed, 01 October 2014 at 2:06 AM

This question is two-fold.

First, am I correct in my interpretation that any real world purchases go through Google Play Store / Apple Store, which means I'd need to set up IAPs through those store fronts, which will mean waiting for approval? Just that I've seen other BaaS, like Applicasa, that advertised the ability for on-the-fly price management (without setting up IAPs through the storefronts). I was under the assumption this was for both real money and virtual money purchases, although I may be wrong.

Secondly, if I define the price of something as say 199 RM, will that automatically convert the price to the user's local currency (probably according to the store fronts, i.e apple's tier system, or google's currencies), or will it list as USD, or what?

Thanks

10 |1200

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

brendan avatar image
brendan answered

Best Answer
Brendan Vanous said on Wed, 01 October 2014 at 10:23 AM

In answer to the first part, we support Google and Apple payments through receipt validation (since by their policies, the title must make the purchase directly from their services), but for other payment providers, you can use the StartPurchase/PayForPurchase/ConfirmPurchase API calls. In the return for StartPurchase, you'll get any available providers in the PurchaseOptions object. If you create a basic catalog item, as in the SetCatalogItems example, and then make a call to StartPurchase, you'll see a range of options for finalizing the purchase. For any of these which require that the purchase be created first in the providers service, that is something you would have to do ahead of attempting the purchase.

For the second part, the Apple and Google systems are not ones that we can influence, in terms of the presentation of the items and their prices. For other providers, yes, the amount shown to the user will be one of: USD, for cases where we can only display the price in that currency, the price in the local user's currency, adjusted for the conversion of USD (RM) into the local currency, or else the price specified in the RealCurrencyPrices object for the CatalogItem in question (which is an override to the price, for the currency in question).

We'll have a write-up available soon that dives more deeply into the purchase process - keep an eye on our blog and forums for more on this.


1 Comment
Brendan Vanous said on Wed, 01 October 2014 at 10:23 AM

In answer to the first part, we support Google and Apple payments through receipt validation (since by their policies, the title must make the purchase directly from their services), but for other payment providers, you can use the StartPurchase/PayForPurchase/ConfirmPurchase API calls. In the return for StartPurchase, you'll get any available providers in the PurchaseOptions object. If you create a basic catalog item, as in the SetCatalogItems example, and then make a call to StartPurchase, you'll see a range of options for finalizing the purchase. For any of these which require that the purchase be created first in the providers service, that is something you would have to do ahead of attempting the purchase.

For the second part, the Apple and Google systems are not ones that we can influence, in terms of the presentation of the items and their prices. For other providers, yes, the amount shown to the user will be one of: USD, for cases where we can only display the price in that currency, the price in the local user's currency, adjusted for the conversion of USD (RM) into the local currency, or else the price specified in the RealCurrencyPrices object for the CatalogItem in question (which is an override to the price, for the currency in question).

We'll have a write-up available soon that dives more deeply into the purchase process - keep an eye on our blog and forums for more on this.

5 comments
10 |1200

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

thanhvantle avatar image thanhvantle commented ·

Is that write-up available? Not sure where to find it. I'm trying to figure out how to display IAPs in the local currency for a Facebook canvas game.

0 Likes 0 ·
brendan avatar image brendan thanhvantle commented ·

Yes, indeed. :) It's the article linked from our blog post on Xsolla payments: https://playfab.com/playfab-adds-xsolla/ (specifically, this tutorial: https://api.playfab.com/docs/non-receipt-purchasing)

0 Likes 0 ·
thanhvantle avatar image thanhvantle commented ·

Thanks Brennan, is it possible to display the RM amount in-game in currencies other than USD? e.g., can i show the price in EUR for German players?

0 Likes 0 ·
thanhvantle avatar image thanhvantle commented ·

Hi Brendan, you can disregard that last question. I think I've figured it out.

0 Likes 0 ·
brendan avatar image brendan thanhvantle commented ·

For the sake of others, you can use RealCurrencyPrices to set the non-USD real-money prices you want to have on items (RM in VirtualCurrencyPrices is the USD price).

0 Likes 0 ·
thanhvantle avatar image
thanhvantle answered

Hey Brendan, thanks for responding! I actually ended up using Facebook's API to get the user_currency, usd_exchange, and currency_offset to make the conversion myself. After reading your response, I tried looking into RealCurrencyPrices but it doesn't seem to return anything in there for me, perhaps I'm doing something wrong; I've been using RM in VirtualCurrencyPrices to date.

In any case, I've been able to convert the currency amount as well as use the appropriate currency symbol based on Facebook's ISO-4217-3 code (which is what FB's user_currency field returns) but I'm not quite sure how to display the appropriate currency format such as using periods instead of commas and vice versa for the specified currency. As far as I'm aware there are ways to achieve this using a person's "culture" information (like en-US or fr-FR) but does something similar exist based on the ISO-4217-3 code (like USD)? Has PlayFab already created something like this?

2 comments
10 |1200

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

brendan avatar image brendan commented ·

We're not collecting the info needed to do auto-detection right now, but we will be adding that in future. For now, your solution does work fine - we'll work on getting a tutorial published with more details on using foreign currency transactions.

0 Likes 0 ·
plourdegui avatar image plourdegui brendan commented ·

Hi Brendan, does such tutorial now exist? Thanks

0 Likes 0 ·
thanhvantle avatar image
thanhvantle answered

Well, I was able to find this:

http://www.thefinancials.com/?SubSectionID=curformat so I should be able to write up something myself.

10 |1200

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

shoti avatar image
shoti answered

Do I get it right, that I can use the StartPurchase/PayForPurchase/ConfirmPurchase methods also in order to realize a purchase system in unity PC/Mac/Linux standalone systems? Or is this only for android/ios?

,

Do I get it right, that StartPurchase/PayForPurchase/ConfirmPurchase are also the way to go for purchasing in unity PC/Mac/Linux standalone games?

10 |1200

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

brendan avatar image
brendan answered

Correct, the StartPurchase flow is designed for payment providers that don't use receipt or entitlement systems. Examples of those would be Facebook, PayPal, Steam, and Xsolla. We have a tutorial detailing how to use those providers here: https://api.playfab.com/docs/non-receipt-purchasing

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.