Skip to content

Overview

  • Version: 2.0.0
  • Servers: https://store.xsolla.com/api
  • Contact Us by Email
  • Contact URL: https://xsolla.com/
  • Required TLS version: 1.2

Shop Builder API provides a third-party solution for implementing the server side for your store interface. Use the endpoints to manage in-game items, in-game currencies, cart, player inventory, promotions, game library, etc.

Download OpenAPI description
Languages
Servers
Mock server
https://xsolla.redocly.app/_mock/api/shop-builder/
https://store.xsolla.com/api/
Operations

Personalized catalog

This API allows to specify rules for user attributes. If the user meets all conditions for a concrete rule, personalized items will be shown.

For personalized promotions see Promotions section.

To pass attributes before a purchase, you can use Xsolla Login API or pass them into user.attributes property while generating token using Pay Station API.

Operations
Operations
Operations
Operations
Operations
Operations

Create order with all items from current cartClient-side

Request

Used for client-to-server integration. Creates an order with all items from the cart and generates a payment token for it. The created order gets the new order status.

The client IP is used to determine the user’s country, which is then used to apply the corresponding currency and available payment methods for the order.

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}.

Notice

As this method uses the IP to determine the user’s country and select a currency for the order, it is important to only use this method from the client side and not from the server side. Using this method from the server side may cause incorrect currency determination and affect payment methods in Pay Station.
Security
AuthForCart
Path
project_idintegerrequired

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
Bodyapplication/json
currencystring

Order price currency. Three-letter currency code per ISO 4217. Check the documentation for detailed information about currencies supported by Xsolla.

localestring

Response language.

sandboxboolean

Creates an order in the sandbox mode. The option is available for those users who are specified in the list of company users.

Default false
settingsobject

Settings for configuring payment process and the payment UI for a user.

custom_parametersobject[ 1 .. 200 ] properties

Project specific parameters.

curl -i -X POST \
  https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/payment/cart \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "sandbox": true,
    "settings": {
      "ui": {
        "theme": "63295a9a2e47fab76f7708e1",
        "desktop": {
          "header": {
            "is_visible": true,
            "visible_logo": true,
            "visible_name": true,
            "visible_purchase": true,
            "type": "normal",
            "close_button": false
          }
        }
      }
    },
    "custom_parameters": {
      "character_id": "ingameUsername"
    }
  }'

Responses

Order was successfully created.

Bodyapplication/json
order_idinteger

Order ID.

tokenstring

Payment token.

Response
application/json
{ "order_id": 641, "token": "f4puMEFFDZcx9nv5HoNHIkPe9qghvBQo" }

Create order with specified itemClient-side

Request

Used for client-to-server integration. Creates an order with a specified item and generates a payment token for it. The created order gets the new order status.

The client IP is used to determine the user’s country, which is then used to apply the corresponding currency and available payment methods for the order.

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}.

Notice

As this method uses the IP to determine the user’s country and select a currency for the order, it is important to only use this method from the client side and not from the server side. Using this method from the server side may cause incorrect currency determination and affect payment methods in Pay Station.
Security
XsollaLoginUserJWT
Path
project_idintegerrequired

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
item_skustringrequired

Item SKU.

Example: booster_mega_1
Bodyapplication/json
currencystring

Order price currency. Three-letter currency code per ISO 4217. Check the documentation for detailed information about currencies supported by Xsolla.

localestring

Response language.

sandboxboolean

Creates an order in the sandbox mode. The option is available for those users who are specified in the list of company users.

Default false
quantityinteger>= 1

Item quantity.

Default 1
promo_codestring

Redeems a code of a promo code promotion with payment.

settingsobject

Settings for configuring payment process and the payment UI for a user.

custom_parametersobject[ 1 .. 200 ] properties

Project specific parameters.

curl -i -X POST \
  https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/payment/item/booster_mega_1 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "sandbox": true,
    "quantity": 5,
    "promo_code": "discount_code",
    "settings": {
      "ui": {
        "theme": "63295a9a2e47fab76f7708e1",
        "desktop": {
          "header": {
            "is_visible": true,
            "visible_logo": true,
            "visible_name": true,
            "visible_purchase": true,
            "type": "normal",
            "close_button": false
          }
        }
      }
    },
    "custom_parameters": {
      "character_id": "ingameUsername"
    }
  }'

Responses

Order was successfully created.

Bodyapplication/json
order_idinteger

Order ID.

tokenstring

Payment token.

Response
application/json
{ "order_id": 641, "token": "f4puMEFFDZcx9nv5HoNHIkPe9qghvBQo" }

Create order for paid offer chain stepClient-side

Request

Creates an order for the item associated with the specified paid offer chain step. The created order gets the new order status.

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}.

Notice

This method must be used on the client side. The user's IP address is used to determine the country, which affects the currency and available payment methods. Using this method from the server side may result in incorrect currency detection and affect payment methods in Pay Station.

Notice

Use this call only for paid offer chain steps. For free steps, use the Claim free offer chain step call instead.
Security
XsollaLoginUserJWT
Path
project_idintegerrequired

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
offer_chain_idintegerrequired

Offer chain ID.

Example: 101
step_numberintegerrequired

Offer chain step number.

Example: 1
curl -i -X POST \
  https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/user/offer_chain/101/step/number/1/order \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Order was successfully created.

Bodyapplication/json
order_idinteger

Order ID.

tokenstring

Payment token.

Response
application/json
{ "order_id": 641, "token": "f4puMEFFDZcx9nv5HoNHIkPe9qghvBQo" }
Operations
Operations
Operations
Operations
Operations
Operations

Catalog

This API allows getting any kind of sellable items or specific item.

Operations
Operations
Operations
Operations
Operations
Operations

Coupons

This API allows to you to manage coupons.

Operations

Promo codes

This API allows to manage promo codes.

Operations

Unique catalog offers

This API allows to you to manage unique catalog offers.

Operations

Discounts

This API allows to you to manage discount promotions.

Operations

Bonuses

This API allows to manage bonus promotions.

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations