Catalog creation
When you create virtual items on Xsolla’s side, you can configure regional prices and limits, as well as use the promotion system and other Xsolla features that are regularly expanded and updated.
Create group
To set up virtual items, you need to configure virtual items groups. Groups allow you to have a multilevel catalog and manage items that are displayed in the store.
- Open your project in Publisher Account.
- In the side menu, click Store.
- In the Virtual Items pane, click:
- Connect — if you haven’t configured virtual items before.
- Configure — if you have configured virtual items before.
- In the drop-down list, choose Create group.
- Specify the following parameters:
- External ID — group ID in the store that is used to manage the virtual items group via API calls. It has to be unique for each group.
- Group name.
- Set the Show group in store toggle to On to display items from this group in the store.
- Click Create group.
Create virtual items
- Click the name of the created group.
- Click Create item.
- Specify information about an item. Required fields:
- SKU — unique item ID
- Item name
- Description
- Price in real currency
- Set the Show item in store toggle to On.
- Click Create item.
For the next steps, you need the SKU of the created item:
Use API calls from the Admin subsection of the Virtual Items & Currency group to set up virtual items.
Basic authorization is used for API calls. Pass the Authorization:Basic <your_authorization_basic_key>
, where <your_authorization_basic_key>
is the merchant ID:API key pair encoded according to the Base64 standard. Go to Publisher Account to find these parameters:
- Merchant ID is shown:
- In the Company settings > Company section.
- In the URL in the browser address bar on any Publisher Account page. The URL has the following format:
https://publisher.xsolla.com/<merchant ID>/<Publisher Account section>
.
- API key is shown in Publisher Account only once when it is created and must be stored on your side. You can create a new key in the following section:
- Company settings > API keys
- Project settings > API keys
For more information about working with API keys, see the API reference.
Key recommendations:
- Save the generated API key on your side. You can view the API key in Publisher Account only once when it is created.
- Keep your API key a secret. It provides access to your personal account and your projects in Publisher Account.
- The API key must be stored on your server and never in binaries or on the frontend.
If an API call you need does not contain the project_id
path parameter, use the API key that is valid in all the company’s projects to set up authorization.
Use API calls from the Catalog subsection of the Virtual Items & Currency group to get the catalog of virtual items on the client side. These calls don’t require basic authorization.
Use the Get virtual items list API call to get the full list of items not divided into groups. To get the list of items from the definite group, pass the external_id
parameter to the Get items list by specified group call.
Found a typo or other text error? Select the text and press Ctrl+Enter.