# Digital Distribution Hub

# Overview {% #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).

<div class='note'><b>Note</b><br><br>This reference shows a design of a future API and not a fully functioning interface. Currently, you can try only <b>Catalog</b> and <b>Notifications</b> groups endpoints. If you’d like to share your feedback, please email us at <a href="mailto:techdoc@xsolla.com">techdoc@xsolla.com</a>.</div>


Version: 1.0.0

## Servers

```
https://store.xsolla.com/api
```

## Security

### AuthForClient

[object Object]

Type: http
Scheme: bearer

### basicAuth

[object Object],[object Object]

Type: http
Scheme: basic

## Download OpenAPI description

 - [Digital Distribution Hub](https://xsolla.redocly.app/_bundle/api/digital-distribution-hub/index.yaml)

## Cart

 - [GET /v2/project/{project_id}/cart/{cart_id}](https://xsolla.redocly.app/api/digital-distribution-hub/cart/get-cart-by-id.md): Returns user’s cart by cart ID.
 - [GET /v2/project/{project_id}/cart](https://xsolla.redocly.app/api/digital-distribution-hub/cart/get-user-cart.md): Returns the current user's cart.
 - [PUT /v2/project/{project_id}/cart/{cart_id}/clear](https://xsolla.redocly.app/api/digital-distribution-hub/cart/cart-clear-by-id.md): Deletes all cart items.
 - [PUT /v2/project/{project_id}/cart/clear](https://xsolla.redocly.app/api/digital-distribution-hub/cart/cart-clear.md): Deletes all cart items.
 - [PUT /v2/project/{project_id}/cart/fill](https://xsolla.redocly.app/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.
 - [PUT /v2/project/{project_id}/cart/{cart_id}/fill](https://xsolla.redocly.app/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.
 - [PUT /v2/project/{project_id}/cart/{cart_id}/item/{item_sku}](https://xsolla.redocly.app/api/digital-distribution-hub/cart/put-item-by-cart-id.md): Updates an existing cart item or creates the one in the cart.
 - [DELETE /v2/project/{project_id}/cart/{cart_id}/item/{item_sku}](https://xsolla.redocly.app/api/digital-distribution-hub/cart/delete-item-by-cart-id.md): Removes an item from the cart.
 - [PUT /v2/project/{project_id}/cart/item/{item_sku}](https://xsolla.redocly.app/api/digital-distribution-hub/cart/put-item.md): Updates an existing cart item or creates the one in the cart.
 - [DELETE /v2/project/{project_id}/cart/item/{item_sku}](https://xsolla.redocly.app/api/digital-distribution-hub/cart/delete-item.md): Removes an item from the cart.
## Game keys

 - [GET /v2/project/{project_id}/items/game](https://xsolla.redocly.app/api/digital-distribution-hub/game-keys/get-games-list.md): Gets a games list for building a catalog. <div class="notice"><strong>Attention.</strong> All projects have the limitation to the number of items that you can get in the response. The default and maxi
 - [GET /v2/project/{project_id}/items/game/group/{external_id}](https://xsolla.redocly.app/api/digital-distribution-hub/game-keys/get-games-group.md): Gets a games list from the specified group for building a catalog. <div class="notice"><strong>Attention.</strong> All projects have the limitation to the number of items that you can get in the respo
 - [GET /v2/project/{project_id}/items/game/sku/{item_sku}](https://xsolla.redocly.app/api/digital-distribution-hub/game-keys/get-game-by-sku.md): Gets a game for the catalog.
 - [GET /v2/project/{project_id}/items/game/key/sku/{item_sku}](https://xsolla.redocly.app/api/digital-distribution-hub/game-keys/get-game-key-by-sku.md): Gets a game key for the catalog.
 - [GET /v2/project/{project_id}/items/game/key/group/{external_id}](https://xsolla.redocly.app/api/digital-distribution-hub/game-keys/get-game-keys-group.md): Gets a game key list from the specified group for building a catalog. <div class="notice"><strong>Attention.</strong> All projects have the limitation to the number of items that you can get in the re
 - [GET /v2/project/{project_id}/items/game/drm](https://xsolla.redocly.app/api/digital-distribution-hub/game-keys/get-drm-list.md): Gets the list of available DRMs.
## Virtual items & currency

 - [GET /v2/project/{project_id}/items/virtual_items](https://xsolla.redocly.app/api/digital-distribution-hub/virtual-items-and-currency/get-virtual-items.md): Gets a virtual items list for building a catalog. <div class="notice"><strong>Attention.</strong> All projects have the limitation to the number of items that you can get in the response. The default
 - [GET /v2/project/{project_id}/items/virtual_currency](https://xsolla.redocly.app/api/digital-distribution-hub/virtual-items-and-currency/get-virtual-currency.md): Gets a virtual currency list for building a catalog. <div class="notice"><strong>Attention.</strong> All projects have the limitation to the number of items that you can get in the response. The defau
 - [GET /v2/project/{project_id}/items/virtual_currency/package](https://xsolla.redocly.app/api/digital-distribution-hub/virtual-items-and-currency/get-virtual-currency-package.md): Gets a virtual currency packages list for building a catalog. <div class="notice"><strong>Attention.</strong> All projects have the limitation to the number of items that you can get in the response.
 - [GET /v2/project/{project_id}/items/virtual_items/group/{external_id}](https://xsolla.redocly.app/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. <div class="notice"><strong>Attention.</strong> All projects have the limitation to the number of items that you can get in the resp
 - [GET /v2/project/{project_id}/items/groups](https://xsolla.redocly.app/api/digital-distribution-hub/virtual-items-and-currency/get-item-groups.md): Gets an items groups list for building a catalog.
## Bundles

 - [GET /v2/project/{project_id}/items/bundle](https://xsolla.redocly.app/api/digital-distribution-hub/bundles/get-bundle-list.md): Gets a list of bundles for building a catalog. <div class="notice"><strong>Attention.</strong> All projects have the limitation to the number of items that you can get in the response. The default and
 - [GET /v2/project/{project_id}/items/bundle/sku/{sku}](https://xsolla.redocly.app/api/digital-distribution-hub/bundles/get-bundle.md): Gets a specified bundle.
## User token

 - [POST /v2/project/{project_id}/distribution_hub/user/auth](https://xsolla.redocly.app/api/digital-distribution-hub/user-token/create-user-token.md): Verifies that a user exists in the game and creates a user token.
## Notifications

 - [POST /push-payments/pay](https://xsolla.redocly.app/api/digital-distribution-hub/notifications/pay-notification.md): Send this notification after successfully charging a user.
 - [POST /push-payments/cancel](https://xsolla.redocly.app/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

 - [POST /v2/project/{project_id}/distribution_hub/payment/cart/{cart_id}](https://xsolla.redocly.app/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.
 - [POST /v2/project/{project_id}/distribution_hub/payment/cart](https://xsolla.redocly.app/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.
 - [POST /v2/project/{project_id}/distribution_hub/payment/item/{item_sku}](https://xsolla.redocly.app/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 /v2/project/{project_id}/distribution_hub/order/{order_id}](https://xsolla.redocly.app/api/digital-distribution-hub/order/get-order.md): Retrieves a specified order.
