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
Mock server
https://xsolla.redocly.app/_mock/api/digital-distribution-hub/
https://store.xsolla.com/api/
Operations

Request

Returns user’s cart by cart ID.

Security
AuthForClient
Path
project_idintegerrequired

Project ID.

Example: 44056
cart_idstringrequired

Cart ID.

Example: custom_id
Query
currencystring

The currency which prices are displayed in, (USD by default). Three-letter currency code per ISO 4217.

Default "USD"
localestring

Response language. Two-letter lowercase language code per ISO 639-1.

Default "en"
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/digital-distribution-hub/v2/project/44056/cart/custom_id?currency=USD&locale=en' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

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\"}"
is_freeboolean

If true, the cart is free.

itemsArray of objects(Cart_inline_response_200_items)
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":[]}]
Response
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ {} ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" } }

Request

Returns the current user's cart.

Security
AuthForClient
Path
project_idintegerrequired

Project ID.

Example: 44056
Query
currencystring

The currency which prices are displayed in, (USD by default). Three-letter currency code per ISO 4217.

Default "USD"
localestring

Response language. Two-letter lowercase language code per ISO 639-1.

Default "en"
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/digital-distribution-hub/v2/project/44056/cart?currency=USD&locale=en' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

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\"}"
is_freeboolean

If true, the cart is free.

itemsArray of objects(Cart_inline_response_200_items)
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":[]}]
Response
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ {} ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" } }

Request

Deletes all cart items.

Security
AuthForClient
Path
project_idintegerrequired

Project ID.

Example: 44056
cart_idstringrequired

Cart ID.

Example: custom_id
curl -i -X PUT \
  https://xsolla.redocly.app/_mock/api/digital-distribution-hub/v2/project/44056/cart/custom_id/clear \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

The cart was successfully cleared.

Operations
Operations
Operations
Operations
Operations
Operations