Deletes all cart items.
Digital Distribution Hub (1.0.0)
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/apifor the Common, Catalog, Cart, and Order groups.https://ps.xsolla.comfor 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.
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.
- https://store.xsolla.com/api/v2/project/{project_id}/cart/clear
- Mock serverhttps://xsolla.redocly.app/_mock/api/digital-distribution-hub/v2/project/{project_id}/cart/clear
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://store.xsolla.com/api/v2/project/44056/cart/clear \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- https://store.xsolla.com/api/v2/project/{project_id}/cart/fill
- Mock serverhttps://xsolla.redocly.app/_mock/api/digital-distribution-hub/v2/project/{project_id}/cart/fill
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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
}
]'The cart with items was successfully returned.
Cart price.
List of attributes and their values corresponding to the item. Can be used for catalog filtering.
Unique attribute ID. The external_id may only contain lowercase Latin alphanumeric characters, dashes, and underscores.
{ "cart_id": "cart_id", "is_free": false, "items": [ { … } ], "warnings": [ { … } ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" } }
- https://store.xsolla.com/api/v2/project/{project_id}/cart/{cart_id}/fill
- Mock serverhttps://xsolla.redocly.app/_mock/api/digital-distribution-hub/v2/project/{project_id}/cart/{cart_id}/fill
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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
}
]'The cart with items was successfully returned.
Cart price.
List of attributes and their values corresponding to the item. Can be used for catalog filtering.
Unique attribute ID. The external_id may only contain lowercase Latin alphanumeric characters, dashes, and underscores.
{ "cart_id": "cart_id", "is_free": false, "items": [ { … } ], "warnings": [ { … } ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" } }