# Digital Distribution Hub # 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](https://developers.xsolla.com/doc/in-game-store/) and [Pay Station](https://developers.xsolla.com/doc/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](https://developers.xsolla.com/digital-distribution-hub/common/user-token/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.
Version: 1.0.0 ## Servers ``` https://store.xsolla.com/api ``` ## Security ### AuthForClient Use the [Create user token](https://developers.xsolla.com/api/digital-distribution-hub/operation/create-user-token) endpoint to generate a token. Type: http Scheme: bearer ### basicAuth Xsolla API uses basic access authentication. All requests to API must contain the `Authorization: Basic ` header, where `your_authorization_basic_key` is the `distribution_hub_id:api_key` pair encoded according to the Base64 standard. Contact your Account Manager to get `distribution_hub_id` and `api_key`. Type: http Scheme: basic ## Download OpenAPI description [Digital Distribution Hub](https://developers.xsolla.com/_bundle/api/digital-distribution-hub/index.yaml) ## Cart ### Get cart by cart ID - [GET /v2/project/{project_id}/cart/{cart_id}](https://developers.xsolla.com/api/digital-distribution-hub/cart/get-cart-by-id.md): Returns user’s cart by cart ID. ### Get current user's cart - [GET /v2/project/{project_id}/cart](https://developers.xsolla.com/api/digital-distribution-hub/cart/get-user-cart.md): Returns the current user's cart. ### Delete all cart items by cart ID - [PUT /v2/project/{project_id}/cart/{cart_id}/clear](https://developers.xsolla.com/api/digital-distribution-hub/cart/cart-clear-by-id.md): Deletes all cart items. ### Delete all cart items from current cart - [PUT /v2/project/{project_id}/cart/clear](https://developers.xsolla.com/api/digital-distribution-hub/cart/cart-clear.md): Deletes all cart items. ### Fill cart with items - [PUT /v2/project/{project_id}/cart/fill](https://developers.xsolla.com/api/digital-distribution-hub/cart/cart-fill.md): 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. ### Fill specific cart with items - [PUT /v2/project/{project_id}/cart/{cart_id}/fill](https://developers.xsolla.com/api/digital-distribution-hub/cart/cart-fill-by-id.md): 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. ### Update cart item by cart ID - [PUT /v2/project/{project_id}/cart/{cart_id}/item/{item_sku}](https://developers.xsolla.com/api/digital-distribution-hub/cart/put-item-by-cart-id.md): Updates an existing cart item or creates the one in the cart. ### Delete cart item by cart ID - [DELETE /v2/project/{project_id}/cart/{cart_id}/item/{item_sku}](https://developers.xsolla.com/api/digital-distribution-hub/cart/delete-item-by-cart-id.md): Removes an item from the cart. ### Update cart item from current cart - [PUT /v2/project/{project_id}/cart/item/{item_sku}](https://developers.xsolla.com/api/digital-distribution-hub/cart/put-item.md): Updates an existing cart item or creates the one in the cart. ### Delete cart item from current cart - [DELETE /v2/project/{project_id}/cart/item/{item_sku}](https://developers.xsolla.com/api/digital-distribution-hub/cart/delete-item.md): Removes an item from the cart. ## Game keys ### Get games list - [GET /v2/project/{project_id}/items/game](https://developers.xsolla.com/api/digital-distribution-hub/game-keys/get-games-list.md): Gets a games list for building a catalog. Attention. All projects have the limitation to the number of items that you can get in the response. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields. ### Get games list by specified group - [GET /v2/project/{project_id}/items/game/group/{external_id}](https://developers.xsolla.com/api/digital-distribution-hub/game-keys/get-games-group.md): Gets a games list from the specified group for building a catalog. Attention. All projects have the limitation to the number of items that you can get in the response. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields. ### Get game for catalog - [GET /v2/project/{project_id}/items/game/sku/{item_sku}](https://developers.xsolla.com/api/digital-distribution-hub/game-keys/get-game-by-sku.md): Gets a game for the catalog. ### Get game key for catalog - [GET /v2/project/{project_id}/items/game/key/sku/{item_sku}](https://developers.xsolla.com/api/digital-distribution-hub/game-keys/get-game-key-by-sku.md): Gets a game key for the catalog. ### Get game keys list by specified group - [GET /v2/project/{project_id}/items/game/key/group/{external_id}](https://developers.xsolla.com/api/digital-distribution-hub/game-keys/get-game-keys-group.md): Gets a game key list from the specified group for building a catalog. Attention. All projects have the limitation to the number of items that you can get in the response. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields. ### Get DRM list - [GET /v2/project/{project_id}/items/game/drm](https://developers.xsolla.com/api/digital-distribution-hub/game-keys/get-drm-list.md): Gets the list of available DRMs. ## Virtual items & currency ### Get virtual items list - [GET /v2/project/{project_id}/items/virtual_items](https://developers.xsolla.com/api/digital-distribution-hub/virtual-items-and-currency/get-virtual-items.md): Gets a virtual items list for building a catalog. Attention. All projects have the limitation to the number of items that you can get in the response. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields. ### Get virtual currency list - [GET /v2/project/{project_id}/items/virtual_currency](https://developers.xsolla.com/api/digital-distribution-hub/virtual-items-and-currency/get-virtual-currency.md): Gets a virtual currency list for building a catalog. Attention. All projects have the limitation to the number of items that you can get in the response. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields. ### Get virtual currency package list - [GET /v2/project/{project_id}/items/virtual_currency/package](https://developers.xsolla.com/api/digital-distribution-hub/virtual-items-and-currency/get-virtual-currency-package.md): Gets a virtual currency packages list for building a catalog. Attention. All projects have the limitation to the number of items that you can get in the response. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields. ### Get items list by specified group - [GET /v2/project/{project_id}/items/virtual_items/group/{external_id}](https://developers.xsolla.com/api/digital-distribution-hub/virtual-items-and-currency/get-virtual-items-group.md): Gets an items list from the specified group for building a catalog. Attention. All projects have the limitation to the number of items that you can get in the response. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields. ### Get items groups list - [GET /v2/project/{project_id}/items/groups](https://developers.xsolla.com/api/digital-distribution-hub/virtual-items-and-currency/get-item-groups.md): Gets an items groups list for building a catalog. ## Bundles ### Get list of bundles - [GET /v2/project/{project_id}/items/bundle](https://developers.xsolla.com/api/digital-distribution-hub/bundles/get-bundle-list.md): Gets a list of bundles for building a catalog. Attention. All projects have the limitation to the number of items that you can get in the response. The default and maximum value is 50 items per response. ### Get specified bundle - [GET /v2/project/{project_id}/items/bundle/sku/{sku}](https://developers.xsolla.com/api/digital-distribution-hub/bundles/get-bundle.md): Gets a specified bundle. ## User token ### Create user token - [POST /v2/project/{project_id}/distribution_hub/user/auth](https://developers.xsolla.com/api/digital-distribution-hub/user-token/create-user-token.md): Verifies that a user exists in the game and creates a user token. ## Notifications ### Pay notification - [POST /push-payments/pay](https://developers.xsolla.com/api/digital-distribution-hub/notifications/pay-notification.md): Send this notification after successfully charging a user. ### Cancel notification - [POST /push-payments/cancel](https://developers.xsolla.com/api/digital-distribution-hub/notifications/cancel-notification.md): Send the notification about payment cancellation if: - the payment was not completed - the payment was refunded ## Order ### Create order with all items from particular cart - [POST /v2/project/{project_id}/distribution_hub/payment/cart/{cart_id}](https://developers.xsolla.com/api/digital-distribution-hub/order/create-order-by-cart-id.md): Creates an order with all items from the particular cart. The created order will get a new order status. ### Create order with all items from current cart - [POST /v2/project/{project_id}/distribution_hub/payment/cart](https://developers.xsolla.com/api/digital-distribution-hub/order/create-order.md): Creates an order with all items from the cart. The created order will get a new order status. ### Create order with specified item - [POST /v2/project/{project_id}/distribution_hub/payment/item/{item_sku}](https://developers.xsolla.com/api/digital-distribution-hub/order/create-order-with-item.md): Creates an order with a specified item. The created order will get a new order status. ### Get order - [GET /v2/project/{project_id}/distribution_hub/order/{order_id}](https://developers.xsolla.com/api/digital-distribution-hub/order/get-order.md): Retrieves a specified order.