User age.
Catalog API (2.0.0)
- Version: 2.0.0
- Servers:
https://store.xsolla.com/api - Contact Us by Email
- Contact URL: https://xsolla.com/
- Required TLS version: 1.2
The Catalog API allows you to configure a catalog of in-game items on the Xsolla side and display the catalog to users in your store.
The API allows you to manage the following catalog entities:
- Virtual items — in-game items such as weapons, skins, boosters.
- Virtual currency — virtual money used to purchase virtual goods.
- Virtual currency packages — predefined bundles of virtual currency.
- Bundles — combined packages of virtual items, currency, or game keys sold as a single SKU.
- Game keys — keys for games and DLCs distributed via platforms like Steam or other DRM providers.
- Groups — logical groupings for organizing and sorting items within the catalog.
The API is divided into the following groups:
Admin — calls for creating, updating, deleting, and configuring catalog items and groups. Authenticated via basic access authentication with your merchant or project credentials. Not intended for storefront use.Catalog — calls for retrieving items and building custom storefronts for end users. Designed to handle high-load scenarios. Support optional user JWT authorization to return personalized data such as user-specific limits and active promotions.
Request
Generates an order and a payment token for it. The order is generated based on the items passed in the request body.
To open the payment UI in a new window, use the following link: https://secure.xsolla.com/paystation4/?token={token}, where {token} is the received token.
For testing purposes, use this URL: https://sandbox-secure.xsolla.com/paystation4/?token={token}.
user.country.value parameter is used to select a currency for the order. If user's country is unknown,
providing the user's IP in X-User-Ip header is an alternative option. One of these two options is required for the correct work of this method.
The selected currency is used for payment methods at Pay Station.
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
Set to true to test out the payment process. In this case, use https://sandbox-secure.xsolla.com to access the test payment UI.
User ID. For testing, you can pass any value. To accept real payments, you need to use the user ID value from your system. This ID is passed in the User validation webhook.
Unique case sensitive code. Contains letters and numbers.
Your custom parameters represented as a valid JSON set of key-value pairs.
You can pass additional parameters through this field to configure anti-fraud filters. See Pay Station documentation.
- https://store.xsolla.com/api/v3/project/{project_id}/admin/payment/token
- Mock serverhttps://xsolla.redocly.app/_mock/api/catalog/v3/project/{project_id}/admin/payment/token
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://store.xsolla.com/api/v3/project/44056/admin/payment/token \
-H 'Content-Type: application/json' \
-d '{
"user": {
"id": {
"value": "user-id"
},
"name": {
"value": "user-name"
},
"email": {
"value": "user@xsolla.com"
},
"country": {
"value": "US",
"allow_modify": false
}
},
"purchase": {
"items": [
{
"sku": "com.xsolla.cup01",
"quantity": 2
},
{
"sku": "com.xsolla.t-shirt01",
"quantity": 1
},
{
"sku": "com.xsolla.cup02",
"quantity": 1
},
{
"sku": "com.xsolla.hat01",
"quantity": 1
}
]
},
"settings": {
"language": "de",
"external_id": "AABBCCDD01",
"currency": "USD",
"payment_method": 1380,
"return_url": "https://developers.xsolla.com/",
"ui": {
"theme": "63295aab2e47fab76f7708e3"
}
}
}'{ "token": "huooAqbXBSJxB8Q4dYBqJp4ybiInqsPb", "order_id": 12345 }