Skip to content

Overview

Digital Distribution Hub is a new Xsolla solution that aims to connect digital and cash based payments via push payments technology and e-commerce.

This reference combines API endpoints for two Xsolla products: In-Game Store and Pay Station. There are two base URLs:

  • https://store.xsolla.com/api for the Common, Catalog, Cart, and Order groups.
  • https://ps.xsolla.com for the Notifications group.

API endpoints in the Catalog group don’t require authorization.

To work with operations in the Cart and Order groups, you need to generate a token via Create user token.

Note

This reference shows a design of a future API and not a fully functioning interface. Currently, you can try only Catalog and Notifications groups endpoints. If you’d like to share your feedback, please email us at techdoc@xsolla.com.
Download OpenAPI description
Languages
Servers
https://store.xsolla.com/api/
Mock server
https://xsolla.redocly.app/_mock/api/digital-distribution-hub/
Operations

Delete all cart items from current cart

Request

Deletes all cart items.

Security
AuthForClient
Path
project_idintegerrequired

Project ID.

Example: 44056
curl -i -X PUT \
  https://store.xsolla.com/api/v2/project/44056/cart/clear \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

The cart was successfully cleared.

Request

Fills the cart with items. If the cart already has an item with the same SKU, the existing item will be replaced by the passed value.

Security
AuthForClient
Path
project_idintegerrequired

Project ID.

Example: 44056
Bodyapplication/json
currencystring(Cart-Payment_settings_currency)

Preferred payment currency. Three-letter currency code per ISO 4217.

itemsArray of objectsrequired

List of items.

items[].​skustringrequired
Default "booster_mega_1"
items[].​quantitynumberrequired
Default 123
curl -i -X PUT \
  https://store.xsolla.com/api/v2/project/44056/cart/fill \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "sku": "booster_mega_1",
      "quantity": 123
    }
  ]'

Responses

The cart with items was successfully returned.

Bodyapplication/json
cart_idstring

Cart ID.

Example: "cart_id"
priceobject or null(Cart_inline_response_200_price)

Cart price.

Example: "{\"amount\":\"6150.0000000000000000\",\"amount_without_discount\":\"6150.0000000000000000\",\"currency\":\"USD\"}"
price.​amountstring
Default "50.0000000000000000"
price.​amount_without_discountstring
Default "100.0000000000000000"
price.​currencystring
Default "USD"
is_freeboolean

If true, the cart is free.

itemsArray of objects(Cart_inline_response_200_items)
items[].​skustring
items[].​groupsArray of objects(Cart_inline_response_200_groups)
items[].​groups[].​external_idstring
items[].​groups[].​namestring
items[].​namestring or null
items[].​attributesArray of objects(Cart_client-attributes)

List of attributes and their values corresponding to the item. Can be used for catalog filtering.

Default []
Example: {"value":{"external_id":"genre","name":"Жанр","values":[{"external_id":"genre_e3364991f92e751689a68b96598a5a5a84010b85","value":"Casual"},{"external_id":"genre_eba07bfd0f982940773cba3744d97264dd58acd7","value":"Strategy"},{"external_id":"genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8","value":"Mobile"}]}}
items[].​attributes[].​external_idstring(Cart_admin-attribute-external_id)[ 1 .. 255 ] characters^[a-zA-Z0-9-_]+$

Unique attribute ID. The external_id may only contain lowercase Latin alphanumeric characters, dashes, and underscores.

Example: "attribute_1"
items[].​attributes[].​namestring

Name of attribute.

Example: "Genre"
items[].​attributes[].​valuesArray of objects
items[].​attributes[].​values[].​external_idstring(Cart_value-external_id)[ 1 .. 255 ] characters^[-_.\d\w]+$

Unique value ID for an attribute. The external_id may only contain lowercase Latin alphanumeric characters, dashes, and underscores.

Example: "attribute_value"
items[].​attributes[].​values[].​valuestring

Value of attribute.

Example: "Strategy"
items[].​typestring
items[].​descriptionstring
items[].​image_urlstring
items[].​quantityinteger
items[].​is_freeboolean
warningsArray of objects(Cart_inline_response_200_1_warnings)
Example: [{"attributes":[],"description":"Take it, take it all! All of Xsollas riches in one Mega Booster.","groups":[{"external_id":"powerups","name":"Power Ups"}],"image_url":"https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png","inventory_options":{"consumable":{"usages_count":1}},"is_free":false,"name":"Xsolla Booster Mega","price":{"amount":"50.0000000000000000","amount_without_discount":"100.0000000000000000","currency":"USD"},"quantity":123,"sku":"booster_mega_1","type":"virtual_good","virtual_item_type":"consumable","virtual_prices":[]}]
warnings[].​skustring
warnings[].​quantityinteger
warnings[].​errorCodeinteger
warnings[].​errorMessagestring
Response
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ {} ], "warnings": [ {} ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" } }

Request

Fills the specific cart with items. If the cart already has an item with the same SKU, the existing item position will be replaced by the passed value.

Security
AuthForClient
Path
project_idintegerrequired

Project ID.

Example: 44056
cart_idstringrequired

Cart ID.

Example: custom_id
Bodyapplication/json
currencystring(Cart-Payment_settings_currency)

Preferred payment currency. Three-letter currency code per ISO 4217.

itemsArray of objectsrequired

List of items.

items[].​skustringrequired
Default "booster_mega_1"
items[].​quantitynumberrequired
Default 123
curl -i -X PUT \
  https://store.xsolla.com/api/v2/project/44056/cart/custom_id/fill \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "sku": "booster_mega_1",
      "quantity": 123
    }
  ]'

Responses

The cart with items was successfully returned.

Bodyapplication/json
cart_idstring

Cart ID.

Example: "cart_id"
priceobject or null(Cart_inline_response_200_price)

Cart price.

Example: "{\"amount\":\"6150.0000000000000000\",\"amount_without_discount\":\"6150.0000000000000000\",\"currency\":\"USD\"}"
price.​amountstring
Default "50.0000000000000000"
price.​amount_without_discountstring
Default "100.0000000000000000"
price.​currencystring
Default "USD"
is_freeboolean

If true, the cart is free.

itemsArray of objects(Cart_inline_response_200_items)
items[].​skustring
items[].​groupsArray of objects(Cart_inline_response_200_groups)
items[].​groups[].​external_idstring
items[].​groups[].​namestring
items[].​namestring or null
items[].​attributesArray of objects(Cart_client-attributes)

List of attributes and their values corresponding to the item. Can be used for catalog filtering.

Default []
Example: {"value":{"external_id":"genre","name":"Жанр","values":[{"external_id":"genre_e3364991f92e751689a68b96598a5a5a84010b85","value":"Casual"},{"external_id":"genre_eba07bfd0f982940773cba3744d97264dd58acd7","value":"Strategy"},{"external_id":"genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8","value":"Mobile"}]}}
items[].​attributes[].​external_idstring(Cart_admin-attribute-external_id)[ 1 .. 255 ] characters^[a-zA-Z0-9-_]+$

Unique attribute ID. The external_id may only contain lowercase Latin alphanumeric characters, dashes, and underscores.

Example: "attribute_1"
items[].​attributes[].​namestring

Name of attribute.

Example: "Genre"
items[].​attributes[].​valuesArray of objects
items[].​attributes[].​values[].​external_idstring(Cart_value-external_id)[ 1 .. 255 ] characters^[-_.\d\w]+$

Unique value ID for an attribute. The external_id may only contain lowercase Latin alphanumeric characters, dashes, and underscores.

Example: "attribute_value"
items[].​attributes[].​values[].​valuestring

Value of attribute.

Example: "Strategy"
items[].​typestring
items[].​descriptionstring
items[].​image_urlstring
items[].​quantityinteger
items[].​is_freeboolean
warningsArray of objects(Cart_inline_response_200_1_warnings)
Example: [{"attributes":[],"description":"Take it, take it all! All of Xsollas riches in one Mega Booster.","groups":[{"external_id":"powerups","name":"Power Ups"}],"image_url":"https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png","inventory_options":{"consumable":{"usages_count":1}},"is_free":false,"name":"Xsolla Booster Mega","price":{"amount":"50.0000000000000000","amount_without_discount":"100.0000000000000000","currency":"USD"},"quantity":123,"sku":"booster_mega_1","type":"virtual_good","virtual_item_type":"consumable","virtual_prices":[]}]
warnings[].​skustring
warnings[].​quantityinteger
warnings[].​errorCodeinteger
warnings[].​errorMessagestring
Response
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ {} ], "warnings": [ {} ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" } }
Operations
Operations
Operations
Operations
Operations
Operations