跳到主要内容

Xsolla SDK for Unity - Web

信息

Xsolla SDK for Unity is an evolution of the enterprise-level Xsolla SDK solution, which was designed for integration into large-scale projects.

This guide helps you integrate the Xsolla SDK for Unity to start accepting payments in your Unity game on Web. By the end, you'll have a fully functioning payment system in your game and experience firsthand how Xsolla streamlines monetization.

Let's dive in and get your game ready to accept payments in just a few easy steps!

Quick start

This quick start guide makes it simple to integrate the Xsolla SDK for Unity on Web and start accepting payments in your Unity game. We'll use a pre-configured test project to cover all the essentials: setting up basic user authentication, importing your products (SKUs), and processing a test payment.

For detailed instructions, please refer to the Quick Start Guide.

Setting up a Publisher Account

Before you begin integrating Xsolla SDK into your game, you'll need to register a Publisher Account.

The Publisher Account is the primary tool for configuring Xsolla features, working with analytics and transactions similar to Google Play Console and App Store Connect for SKU management.

important

You'll need to have an active Publisher Account to obtain a Project ID you'd use throughout the whole SDK integration process.

For detailed instructions, please refer to Setting up a Publisher Account.

Install the SDK

Now that you've set up your Publisher Account, the next step is to install the Xsolla SDK for Unity plugin in your Unity project.

For detailed installation instructions, see the Installation Guide.

Configure the SDK

Once you've installed the SDK, the next step is configuration.

For detailed instructions, please refer to the Configuration Guide.

信息

Using a device ID to log in is not supported on the Web platform. You must provide an access token instead. For more information, please refer to Authentication via custom ID

Alternatively, you can use the Delayed configuration feature to postpone SDK initialization until an access token is obtained.

Initialize the SDK

With configuration complete, you're now ready to initialize the SDK in your Unity project.

For detailed steps and best practices, refer to the Initialization Guide.

Make a Purchase

Now that the SDK is initialized, your app is ready to start processing payments.

For detailed instructions, please refer to Make Purchase.

Collect Payment

The SDK leverages Xsolla Pay Station for secure payment collection.

These steps will guide you through a test payment collection flow:

Purchase Validation

After setting up payments, you might want to validate your purchase to ensure transaction security and reliability.

For detailed instructions, please refer to Purchase Validation.

Testing & Sandbox

As a final step, use the sandbox environment to safely test your entire payment integration without real transactions.

For detailed instructions, please refer to the Testing & Sandbox.

What's next?

Congratulations! 🎉 You've successfully integrated Xsolla SDK for Unity on Web!

This achievement unlocks access to over 1000 global payment methods and sets the foundation for integrating more Xsolla solutions, including our powerful Web Shop.