Get started

This type of integration is suitable for partners who have already implemented the game logic for authorization, in-game store, and player’s inventory on their servers and want to use Xsolla Pay Station. You will need to get the Pay Station access token and configure the handling of webhooks.

During server integration, the following payment processing logic is implemented:

  1. The client sends a request to the application server to open the payment interface.
  2. The application server sends information about the currency and amount of the payment to the Xsolla server.
  3. The Xsolla server returns a token with purchase details and Pay Station parameters.
  4. The application server sends the received token to the client.
  5. The client opens Pay Station in a browser using the SDK.
  6. After paying for the purchase, a webhook with the payment status is sent to the application server.

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
Additionally, the SDK supports creating WebGL build to run your application in a browser.
Note:
We recommend you use the Mono compiler for desktop platforms as it's compatible with the provided in-game browser. If you use other browser solutions, you can use the IL2CPP compiler instead. To create game builds for Android, you can use either Mono or IL2CPP compilers.

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 Payments Unity SDK, follow these steps:

  1. Install the asset.
  2. Set up a project in your Publisher Account.

Install the asset

  1. Download Unity.
  2. Pick a personal or professional Unity license based on your preferences.
  3. Create a new Unity project.
  4. Download the asset from Unity Asset Store or GitHub.

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

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

Integration flow

To integrate the Payments Unity SDK:

  1. Set up an in-game store and product catalog on your server.
  2. Set up the asset for your Unity project.
  3. Get a token.
  4. Open the payment UI.
  5. Set up webhook handling.

After the integration is complete, test the payment process.

Note:
This guide describes the minimum settings required to quick-start the module. For any questions, contact your Account Manager.

Continue reading