Xsolla SDK for Unity - PC
Xsolla SDK for Unity is an evolution of the enterprise-level Xsolla SDK solution, which was designed for integration into large-scale projects.
💡 Global-ready PC monetization: leverage Xsolla’s payment engine for compliant, localized checkout—via Web Shop, Buy Button, or direct API—to maximize revenue in premium and F2P models alike.
This guide helps you integrate the Xsolla SDK for Unity to start accepting payments in your Unity game on PC. 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 PC 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.
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.
For Unity Editor, Windows, and macOS builds, the Web View Type will default to Auto and will launch in the system’s default external browser.
This behavior ensures compatibility and consistency during development and testing across platforms.
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:
-
Choose the Card payment method:
-
Use one of the test cards listed here ↗ (https://developers.xsolla.com/doc/pay-station/testing/test-cards) and click Pay to confirm the payment:
-
Once the payment goes through, you'll see a confirmation:
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 PC!
This achievement unlocks access to over 1000 global payment methods and sets the foundation for integrating more Xsolla solutions, including our powerful Web Shop.