Get started
This integration option allows you to take advantage of Xsolla Pay Station if you use a third-party backend solution.
After integrating Xsolla SDKs, you can use Xsolla Pay Station for processing in-game purchases in combination with other BaaS providers responsible for game logic.
Currently, Xsolla provides integration with PlayFab services.
Requirements
System requirements
- 64-bit OS
- Windows 7 SP1 and higher
- macOS 10.12 and higher
- A compatible version of Unity:
- 2018.4.30f1
- 2019.3.4f1
Target OS
- iOS
- Android
- macOS
- Windows 64-bit
Charge policy
Xsolla offers the necessary tools to help you build and grow your gaming business, including personalized support at every stage. The terms of payment are determined by the contract that can be signed via Publisher Account.
The cost of using all Xsolla products is 5% of the amount you receive for the sale of the game and in-game goods via the Xsolla Pay Station. If you do not use the Xsolla Pay Station in your application, but use other products, contact your Account Manager to clarify the terms and conditions.
Prerequisites
Before integrating the Payments Unity SDK with the PlayFab service, follow these steps:
- Install the asset.
- Set up the project in your Publisher Account.
- Set up a project in PlayFab.
Install the asset
- Download Unity.
- Pick a personal or professional Unity license based on your preferences.
- Create a new Unity project.
- Download the asset from Unity Asset Store or GitHub.

- Add a
Login demo scene in build settings:- Go to
Assets > Xsolla > PlayfabIntegrationDemo > LoginDemo > Scenes and launch theLogin scene. - Open
File > Build settings and clickAdd Open Scenes .
- Go to
- Do the same for the
Store demo scene found inAssets > Xsolla > PlayfabIntegrationDemo > StoreDemo > Scenes folder. - Check that demo scenes are added in the following order:
- 0 - Login
- 1 - Store
Make sure that only the

- Make sure that the
Mono compiler is used for creating a game build (optional):- Click
Edit > Project Settings in the main menu. - Go to
Other Settings > Configuration block. - Make sure that
Mono is chosen in theScripting Backend field.
- Click

After installing the asset, launch the demo scene showing the joint use of the Payments Unity SDK with the PlayFab service.
Set up the project in your Publisher Account
- Register an Xsolla Publisher Account.
- Configure a Publisher Account project that is automatically created after the previous step:
- Click
My game in the Projects block and go to Project settings. - In setup mode, specify a Project name and click Save.
- Click

- Go to Integration settings and check that the Integrate
Commerce API toggle is set to Off.
- Select the PlayFab integration option.
- Click Save.

During the integration process, you will need the following parameters:
- Merchant ID found in Publisher Account > Project settings > Webhooks.

- API key found in Publisher Account > Company settings > API key.

- Project ID found in Publisher Account > Project settings > Project ID.

Set up the project in PlayFab
- Create a PlayFab account.
- Set up a project created automatically after registration:
- Click the ⚙ icon to the right of the
My Game project to open the menu. Click Edit title info. - Specify Name and click Save title.
- Click the ⚙ icon to the right of the
- Go to the project settings and click Add-ons.
- Select the
Xsolla add-on in the Monetization section. - Click Install
Xsolla . - Specify an email to receive notifications, Merchant ID, Project ID, and API key and enable the I agree to the Xsolla Terms and Conditions option.
- Indicate whether you want to use the sandbox mode when processing payments (this setting can be changed later).
- Click Install
Xsolla .
PlayFab must approve a new add-on. The PlayFab team will send you a message to the specified email when it happens.
During the integration process you will need a Title ID. You can find it in the project settings in Title Settings > API Features section or in the address bar of the browser when navigating to the project settings.

Set up the project in your Publisher Account
- Register an Xsolla Publisher Account.
- Configure a Publisher Account project that is automatically created after the previous step:
- Click
My game in the Projects block and go to Project settings. - In setup mode, specify a Project name and click Save.
- Click

- Go to Integration settings and check that the Integrate
Commerce API toggle is set to On.
You will need the following parameters for the integration:
- Merchant ID found in Project settings > Webhooks.

- API key found in Company settings > API key section.

- Project ID found in Project settings > Project ID.

- Secret key found in Project settings > Webhooks section.

Demo
We provide demo scene to demonstrate the integration of the Payments Unity SDK with the PlayFab service. It is available in the
By default, the demo uses parameters of preset PlayFab and Publisher Account projects.
Default values for the demo:
Key | Value |
---|---|
Title ID | 2915B |
Username | xsolla |
Password | xsolla |
Merchant ID | 136551 |
Project ID | 58866 |
To test the purchase process, launch the
Limitations:
- Demo supports the purchase of individual items only. Shopping cart is not available.
- A nonconsumable item may exist in more than one instance in the inventory.
Integration flow
To integrate the Payments Unity SDK with PlayFab:
- Set up a product catalog in PlayFab, add items to the catalog. For the next steps of integration, you will need the Item ID of the created goods.
- Add a script to receive a payment token.
- Set up webhooks.
- Set up the Virtual Items module in your Publisher Account.
- Set up virtual currency packages in your in-game store (optional).
- Set up the asset for your Unity project.
After the integration is complete, test the payment process.