question

psilvestre avatar image
psilvestre asked

Get purchases made by user on CloudScript server API.

Hi,

Is there any way to get purchases made by user on CloudScript server API? I have to check if transaction Id provided by the client is validated and stored in PlayFab.

Thanks!

apisCloudScript
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

·
brendan avatar image
brendan answered

Can you describe in more detail what it is you're trying to do? You would normally check the player's ownership of an item by getting that player's inventory.

6 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.

psilvestre avatar image psilvestre commented ·

I was not refering to player's inventory, I was refering to native mobile purchases that user has done when native receipts are checked as valid. They are the purchases shown in "Purchases" tag in users web interface. I need to check it through server api.

0 Likes 0 ·
brendan avatar image brendan psilvestre commented ·

There isn't an API call for that - storing all player purchases, for all time, and being able to return that history rapidly via an API call would actually be fairly expensive. That's why the retention period for titles is as short as it is - historical data would rapidly become massive, requiring costly full table scans to collect.

Can you describe the actual gameplay feature you're trying to enable? Starting from a top-down approach is usually best, as it allows us to look at the end-goal of the player experience and help to design the best way to get there.

0 Likes 0 ·
psilvestre avatar image psilvestre psilvestre commented ·

I was trying to check if a transaction Id is successfully validated by PlayFab server. I would like to get all purchases done by a user and check if contains this transaction Id. It would be the same information that is accessible through web interface checking Purchases tag for concrete user.

0 Likes 0 ·
brendan avatar image brendan psilvestre commented ·

Actually, no, the Game Manager only shows purchases that occurred within the retention period - not for all time. If this is a must-have feature, I'd recommend using our Event Archive or Snowflake integration to enable you to get all the events for your game and populate an external data table.

0 Likes 0 ·
Show more comments

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.