Digital Distribution Hub (1.0.0)
Digital Distribution Hub是一个全新的艾克索拉解决方案,旨在通过推送支付(Push payments)技术和电子商务来联结数字与现金支付。
https://store.xsolla.com/api,用于常用、目录、购物车和订单组。https://ps.xsolla.com,用于通知组。
目录组中的API端点不需要授权。
要使用购物车和订单组中的操作,需通过创建用户令牌来生成一个令牌。
下载 OpenAPI 描述
语言
服务器
Mock server
https://xsolla.redocly.app/_mock/zh/api/digital-distribution-hub/
https://store.xsolla.com/api/
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/digital-distribution-hub/v2/project/{project_id}/cart/{cart_id}/clear
- https://store.xsolla.com/api/v2/project/{project_id}/cart/{cart_id}/clear
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://xsolla.redocly.app/_mock/zh/api/digital-distribution-hub/v2/project/44056/cart/custom_id/clear \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'正文application/json
首选支付币种。参照ISO 4217标准的三字母货币代码。
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/digital-distribution-hub/v2/project/{project_id}/cart/{cart_id}/fill
- https://store.xsolla.com/api/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://xsolla.redocly.app/_mock/zh/api/digital-distribution-hub/v2/project/44056/cart/custom_id/fill \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '[
{
"quantity": 123,
"sku": "booster_mega_1"
}
]'已成功返回含商品的购物车。
购物车价格。
示例: "{\"amount\":\"6150.0000000000000000\",\"amount_without_discount\":\"6150.0000000000000000\",\"currency\":\"USD\"}"
示例: [{"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":[]}]
响应
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ { … } ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" }, "warnings": [ { … } ] }
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/digital-distribution-hub/v2/project/{project_id}/cart/{cart_id}/item/{item_sku}
- https://store.xsolla.com/api/v2/project/{project_id}/cart/{cart_id}/item/{item_sku}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://xsolla.redocly.app/_mock/zh/api/digital-distribution-hub/v2/project/44056/cart/custom_id/item/booster_mega_1 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'