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
Operations
Operations
Operations
Operations
Operations
Operations

Create order with all items from current cart

Request

Creates an order with all items from the cart. The created order will get a new order status.

Security
AuthForClient
Path
project_idintegerrequired

Project ID.

Example: 44056
Bodyapplication/jsonrequired

Object with order creation data.

geotypenumberrequired

Distributor partner ID on the Xsolla's side.

Example: 13038
currencystring(Cart-Payment_settings_currency)required

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

quantityinteger

Item quantity.

Example: 1
curl -i -X POST \
  https://store.xsolla.com/api/v2/project/44056/distribution_hub/payment/cart \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "geotype": 13038
  }'

Responses

Order was successfully created.

Bodyapplication/json
order_idinteger

Order ID.

billing_infoobject(Order_inline_response_200_billing_info)

Billing information.

billing_info.​priceobject(Order_inline_response_200_billing_info_price)
billing_info.​price.​amountnumber
Example: 1480.45
billing_info.​price.​currencystring= 3 characters

Purchase currency. Three-letter code per ISO 4217.

Example: "USD"
billing_info.​indirect_taxArray of objects(Order_inline_response_200_billing_info_indirect_tax)
billing_info.​indirect_tax[].​namestring
Example: "VAT"
billing_info.​indirect_tax[].​amountnumber
Example: 246.75
billing_info.​indirect_tax[].​ratenumber
Example: 20
billing_info.​direct_taxArray of objects(Order_inline_response_200_billing_info_direct_tax)
billing_info.​direct_tax[].​namestring
Example: "TAX"
billing_info.​direct_tax[].​amountnumber
Example: 150
billing_info.​direct_tax[].​ratenumber
Example: 10
Response
application/json
{ "order_id": 641, "billing_info": { "price": {}, "indirect_taxes": [], "direct_taxes": [] } }

Request

Creates an order with a specified item. The created order will get a new order status.

Security
AuthForClient
Path
project_idintegerrequired

Project ID.

Example: 44056
item_skustringrequired

Item SKU.

Example: booster_mega_1
Bodyapplication/jsonrequired

Object with order creation data.

geotypenumberrequired

Distributor partner ID on the Xsolla's side.

Example: 13038
currencystring(Cart-Payment_settings_currency)required

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

quantityinteger

Item quantity.

Example: 1
curl -i -X POST \
  https://store.xsolla.com/api/v2/project/44056/distribution_hub/payment/item/booster_mega_1 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "geotype": 13038
  }'

Responses

Order was successfully created.

Bodyapplication/json
order_idinteger

Order ID.

billing_infoobject(Order_inline_response_200_billing_info)

Billing information.

billing_info.​priceobject(Order_inline_response_200_billing_info_price)
billing_info.​price.​amountnumber
Example: 1480.45
billing_info.​price.​currencystring= 3 characters

Purchase currency. Three-letter code per ISO 4217.

Example: "USD"
billing_info.​indirect_taxArray of objects(Order_inline_response_200_billing_info_indirect_tax)
billing_info.​indirect_tax[].​namestring
Example: "VAT"
billing_info.​indirect_tax[].​amountnumber
Example: 246.75
billing_info.​indirect_tax[].​ratenumber
Example: 20
billing_info.​direct_taxArray of objects(Order_inline_response_200_billing_info_direct_tax)
billing_info.​direct_tax[].​namestring
Example: "TAX"
billing_info.​direct_tax[].​amountnumber
Example: 150
billing_info.​direct_tax[].​ratenumber
Example: 10
Response
application/json
{ "order_id": 641, "billing_info": { "price": {}, "indirect_taxes": [], "direct_taxes": [] } }

Request

Retrieves a specified order.

Security
AuthForClient
Path
project_idintegerrequired

Project ID.

Example: 44056
order_idstringrequired

Order ID.

Example: 656
curl -i -X GET \
  https://store.xsolla.com/api/v2/project/44056/distribution_hub/order/656 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful order request.

Bodyapplication/json
order_idinteger

Order ID.

Example: 1
statusstring

Order status: new/paid/done/canceled.

Example: "paid"
contentobject(Order_inline_response_200_1_content)

Order details.

content.​priceobject(Order_inline_response_200_1_content_price)

Order price.

content.​price.​amountstring

Order discount price.

Example: "30"
content.​price.​amount_without_discountstring

Order price.

Example: "30"
content.​price.​currencystring

Default purchase currency. Three-letter code per ISO 4217.

Example: "USD"
content.​virtual_priceobject(Order_inline_response_200_1_content_virtual_price)

Order price in virtual currency.

content.​virtual_price.​amountstring

Order discount price.

Example: "100"
content.​virtual_price.​amount_without_discountstring

Order price.

Example: "150"
content.​virtual_price.​currencystring

Virtual currency SKU used in order.

Example: "test_vc"
content.​is_freestring

If true, the order is free.

Example: "false"
content.​itemsArray of objects(Order_inline_response_200_1_content_items)

Items list.

Example: [{"sku":"some_sku","quantity":1,"is_free":false,"price":{"amount":"30","amount_without_discount":"30","currency":"USD"}}]
content.​items[].​skustring

Unique item ID. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.

Example: "some_sku"
content.​items[].​quantityinteger

Item quantity.

Example: 1
content.​items[].​is_freestring

If true, the item is free.

Example: "false"
content.​items[].​priceobject(Order_inline_response_200_1_content_price_1)

Item price.

content.​items[].​price.​amountstring

Discounted item price.

Example: "30"
content.​items[].​price.​amount_without_discountstring

Item price.

Example: "30"
content.​items[].​price.​currencystring

Default purchase currency. Three-letter code per ISO 4217.

Example: "USD"
Response
application/json
{ "order_id": 1, "status": "paid", "content": { "price": {}, "is_free": "false", "items": [] } }