Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Kosar · Mar 22, 2019 at 02:01 AM · apisIn-Game Economygame managerpricing

Purchase Item - Potentioal Bug?

So Im calling the Purchase Item api within my game and I have provided all the necessary information for the request. Now, when I state a price same as store price, it goes through. However, when I reduce the price within the Game manager, the call fails and I can not make the purchase.

I have provided a store ID and it should just fetch the price from the store and not fail the operation. Any idea why this is occurring? could this be a bug?

Comment

People who like this

0 Show 2
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SethDu ♦ · Mar 22, 2019 at 08:44 AM 0
Share

What is the error message?

avatar image Kosar SethDu ♦ · Mar 22, 2019 at 03:27 PM 0
Share

It will show the failed message I have set for it.

9aa4cd093a9602514cdee0b2eff90088.png (152.4 kB)

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Andy · Mar 23, 2019 at 11:15 PM

The price you provide on the client must be identical to the price in the store. If the two differ, you'll get back a WrongPrice error with a code of 1053. This is done to ensure your client and your back end agree on the amount of virtual currency that will be removed from the player in exchange for the item.

Comment

People who like this

0 Show 6 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Kosar · Mar 24, 2019 at 06:48 AM 0
Share

So what if we want to do a sale for instance and want to decrease the price on some items? Updating the client for such purpose everytime is not a variable option.

avatar image Brendan ♦♦ Kosar · Mar 24, 2019 at 09:02 AM 0
Share

That's specifically what the stores and the store overrides are for. You can create multiple stores, with different prices for items, and let the players use them based upon which segments they're in (https://api.playfab.com/docs/tutorials/landing-analytics/ab-store).

If the client could specify any price, completely separately from the prices in the stores you have defined, hackers could easily cheat the game by specifying prices far lower than you would allow.

avatar image Kosar Brendan ♦♦ · Mar 24, 2019 at 11:48 AM 0
Share

Couldn't this be alot simpler if prices were decided in game manager only and not from the client side? If we were to simply wanted to drop price of everything at some point without segmentation then im assuming the client still has to be updated to reflect those changes. Whereas if it was decided in game manager, it will sync seamlessly without any additional work.

Show more comments
avatar image SethDu ♦ Kosar · Mar 25, 2019 at 06:09 AM 0
Share

I did a quick test. Hopefully it can help you. I try to retrieve the "GM" price of items in a Store.

the output log:

snipaste-2019-03-25-14-02-07.png (342.4 kB)
snipaste-2019-03-25-14-04-03.png (43.0 kB)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    6 People are following this question.

    avatar image avatar image avatar image avatar image avatar image avatar image

    Related Questions

    Prize tables are not rewarding instantly after reset 2 Answers

    How can I access game data using apache php server ?,Can I access User data on apache server. 1 Answer

    Debug the API Calls dashboard 1 Answer

    iOS Restore Purchase Receipt using Unity IAP 1 Answer

    Subscription and Auto-Renewal 2 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges