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.

System requirements

  • Android OS 5.0 or higher
  • Internet connection is essential for Android SDKs

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 Android SDK with the PlayFab service, follow these steps:

  1. Download and install Android Studio.
  2. Create a new project.
  3. Set up the project in your Publisher Account.
  4. Set up a project in PlayFab.

Set up the project in your Publisher Account

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

    1. Go to Integration settings and check that the Integrate Commerce API toggle is set to Off.

    1. Select the PlayFab integration option.
    2. 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

  1. Create a PlayFab account.
  2. Set up a project created automatically after registration:
    1. Click the ⚙ icon to the right of the My Game project to open the menu. Click Edit title info.
    2. Specify Name and click Save title.

  1. Go to the project settings and click Add-ons.
  2. Select the Xsolla add-on in the Monetization section.
  3. Click Install Xsolla.
  4. 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.
  5. Indicate whether you want to use the sandbox mode when processing payments (this setting can be changed later).
  6. 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.

Demo

We provide the Xsolla Sample App to demonstrate the integration capabilities and functions of SDKs. Use it as an example.

For the demo app, a project in Publisher Account is preset and an in-game store is fully configured. When you launch the demo app, the sign-up/login page is displayed. Sign up in the app or log in with a demo account (username — xsolla, password — xsolla).

Integration flow

To integrate the Payments Android SDK with PlayFab:

  1. 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.
  2. Add a script to receive a payment token.
  3. Set up webhooks.

  1. Set up the Virtual Items module in your Publisher Account.
  2. Set up virtual currency packages in your in-game store (optional).
  3. Get a token.
  4. Install the library.
  5. Configure Return URL.
  6. Set up event processing and SDK methods.

After the integration is complete, test the payment process.

Continue reading