Get started

Serverless integration allows you to use Xsolla Pay Station to process purchases in games where all the game logic is implemented on the client side and the server part is missing. With this integration, you do not need to configure webhooks.

Limitations:

  • A short list of payment systems that is optimal for this type of integration is used.
  • In the payment interface, inventory, payment history, and balance, working with saved billing accounts and subscriptions are not available.

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

  1. Install the asset.
  2. Set up the 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. Add a ServerlessStore demo scene in build settings:
    1. Go to Assets > Xsolla > Demo > ServerlessIntegrationDemo > Scenes and launch the ServerlessStore scene.
    2. Open File > Build settings and click Add Open Scenes.
  2. 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.

After installing the asset, launch the demo scene showing how Pay Station works with serverless integration.

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 Serverless integration option.
    2. Click Save.

If you want to change the settings of a project that you already created earlier in your Publisher Account:

  1. Go to your project.
  2. Disable all modules except Virtual Items.
  3. Go to Project settings > Integration settings and check that the Integrate Commerce API toggle is set to Off.
  4. Select the Serverless integration option.
  5. Click Save.

During the integration process you will need the Project ID found in Publisher Account > Project settings > Project ID.

Demo

To demonstrate the functionality of serverless integration, we provide the ServerlessStore demo scene. It is available in the Assets > Xsolla > Demo > ServerlessIntegrationDemo > Scenes folder. Use it as an example.

By default, the demo uses the Project ID 68789 of a preset Publisher Account project.

Limitations:

  • User authentication is not available in the demo.
  • Demo supports the purchase of virtual items and currency packages for real money only.

Integration flow

To integrate the Payments Unity SDK:

  1. Set up the Virtual Items module in your Publisher Account.
  2. Set up a file with an in-game items list.
  3. Set up the asset for your Unity project.

After the integration is complete, test the payment process.

Continue reading