Integration with PlayFab

How it works

Notice
Supported PlayFab API version: Economy v1.
PlayFab offers game developers ready-to-use server solutions to manage item catalog and monetization. After integration with PlayFab, you can:

Who can use it

  • Partners who integrated PlayFab and now want to increase items (virtual currency and virtual items) distribution area via Xsolla solutions.
  • Partners who integrated Xsolla solutions and now want to monetize their items in PlayFab (sell items for real currency).

Import rules

When importing items from PlayFab, the following logic applies:

  • Durable goods from PlayFab are imported as virtual items (not virtual currency nor bundles).
  • All items, as well as virtual currency packages and items within a PlayFab bundle, are imported as consumable (parameter consumable = true or not specified).
  • Virtual currency is imported with Partly available status and without a specified price (API flags: is_show_in_store = false, is_enabled = true, is_free = true).
  • A bundle containing only one type of virtual currency is imported as a package of virtual currency.
  • A bundle containing multiple types of virtual currency is imported as separate virtual currency packages. For each unique combination of SKU and quantity, a free virtual currency package is created with Partly available status (API flags: is_show_in_store = false, is_enabled = true, is_free = true).
  • A bundle containing different types of items is imported as a bundle.
  • If the Description field for an item is not filled in PlayFab, the Name field is used as the item description; if there is no Name, the SKU is used.

Import limitations

In-Game Store limitations

  • Containers and bundles containing containers are not imported.
  • DropTables and bundles containing DropTables are not imported.
  • Parameters specific to PlayFab, such as isStackable, isTradable, UsageCount, UsagePeriod, UsagePeriodGroup are ignored.
  • Consumable items are created without considering the quantity (the item disappears from the inventory after the first use).

PlayFab limitations

  • PlayFab does not store prices in real currencies. Only preconfigured virtual currency coded as RM (Real money) is used, equivalent to real currency—1 cent (100 RM = 1 USD). Therefore, item prices can only be set in virtual currency or RM.
  • Items’ SKUs must be unique and consist of numbers, Latin letters, hyphens and underscores.

How to get it

Import catalog from PlayFab

Note
You’ll need a project ID and a secret project key in PlayFab. Also, the catalog you want to import to Xsolla, should be set up in PlayFab as basic (Base).

If you have not configured PlayFab yet, do the following:

Go to Publisher Account and import item catalog from PlayFab to In-Game Store.

Note
You can import virtual items, virtual currency or virtual currency packages.

  1. Open your Publisher Account and go to Store > Catalog management > Integration with external platforms > PlayFab.
  2. In the Item import tab specify:
  3. Click Save.
  4. Synchronize user inventory with PlayFab (optionally):
    1. Go to the Inventory synchronization and specify:
    2. Set the Synchronize user inventory with PlayFab toggle to On.
    3. Click Save.
  5. Go to the Item import tab and click Start import. Catalog import will start automatically.
  6. To sell virtual items in the web store created by Site Builder, configure item groups in Publisher Account and assign one or more of them to each item.
  7. To display item images, upload them to your Publisher Account.

To check if the import completed successfully, go to the Store section in the side menu and make sure that items, currency, and bundles are enabled on the Virtual currency, Virtual items, and Bundles tabs.

Notice
When you check the import results, please consider that a virtual currency package is a bundle containing only one currency. PlayFab uses virtual currency RM (Real money) which is equivalent to real currency — 1 cent (100 RM = 1 USD). For example, if you import 400 RM from PlayFab, you will see 4 USD in your Publisher Account.

Reimport catalog

When reimporting the catalog, you need to consider that:
  • Items that are already in the Store will be updated.
  • Items that are not available in the Store will be added.
  • Items that have already been removed from the source of import will remain in the Store. You can delete them in your Publisher Account or via API.

Add items to the PlayFab inventory

You can set up the adding of items purchased in the Xsolla In-Game Store to your PlayFab inventory in the following ways:
Note
Playfab allows you not to set the name or description of the product. In this case, an empty string is returned in the API calls.

If you want to synchronize user inventory with PlayFab:

  1. Open your Publisher Account and go to Store > Catalog management > Integration with external platforms > PlayFab.
  2. Go to the Inventory synchronization and specify:
  3. Set the Synchronize user inventory with PlayFab toggle to On.
  4. Click Save.

Now information about items purchased in the In-Game Store are automatically transferred to PlayFab.

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Last updated: December 27, 2024

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!