General information
The player inventory contains the user’s items that they bought or received according to the game logic.
The inventory solution is based on the In-Game Store product. After a successful purchase, items are added to the player inventory automatically on the Xsolla side.
Users are identified via the authentication system based on the Login product. If you have configured your own authentication system, you can use a user JWT for client methods.
How-tos
Implement the sale of virtual items and virtual currency outside the game via the store site. The purchased items and currency will be available in the player’s inventory.
To integrate your store site with the SDK:
- Create a store site.
- Specify the site address of the in-game store in the application code.
- Implement the logic for your application to work with the store site.
Create a store site
You can create a store site with Site Builder by following the instructions for connecting a store on the site.
Recommendations for the logic for your application to work with the store site
Follow these recommendations when developing your application:
- Synchronize the fields of user registration and authorization in your application and in the Login widget on the store site:
- If a user email and password are used for registration and authorization, set the username equal to the email in the application.
- If you use a username, user email and password for registration and authorization, contact your Customer Success Manager or email to csm@xsolla.com to change the Login widget fields.
- When navigating to the store site from the application client, implement pass-through user authorization. To do this, the user token must be passed in the URL parameters. An example of authorization is shown in the demo scene for SDK.
Continue reading
Found a typo or other text error? Select the text and press Ctrl+Enter.