コンテンツへスキップ

Digital Distribution Hub (1.0.0)

概要

Digital Distribution Hubは、プッシュペイメント技術やEコマースを介して、デジタルとキャッシュベースの決済を結びつけることを目的とした、エクソラの新しいソリューションです。

この参照は、以下の2つエクソラ製品のAPIエンドポイントを組み合わせたものです:ゲーム内ストア決済ステーション。2つのベースURLがあります:

  • 一般カタログカート、及び注文グループの場合は https://store.xsolla.com/api
  • 通知グループの場合は、https://ps.xsolla.com

カタロググループのAPIエンドポイントは認証を必要としません。

カート注文グループの操作を行うには、ユーザートークンを作成するを介してトークンを生成する必要があります。

注意

この参照は、将来のAPIのデザインを示すものであり、完全に機能するインターフェースではありません。現在は、カタログおよび通知グループのエンドポイントのみを試すことができます。ご意見をお聞かせいただける場合は、techdoc@xsolla.comまでご連絡ください。
OpenAPI記述をダウンロード
言語
サーバー
Mock server
https://xsolla.redocly.app/_mock/ja/api/digital-distribution-hub/
https://store.xsolla.com/api/
操作

カートIDでカートを取得する

リクエスト

カートIDでユーザーのカートを返します。

セキュリティ
AuthForClient
パス
project_idinteger必須

プロジェクトID。

例: 44056
cart_idstring必須

カートID。

例: custom_id
クエリ
currencystring

価格が表示される通貨(デフォルトではUSD)。ISO 4217に準拠した3文字の通貨コード。

デフォルト "USD"
localestring

応答言語。ISO639-1に準拠した2文字の小文字の言語コード。

デフォルト "en"
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ja/api/digital-distribution-hub/v2/project/44056/cart/custom_id?currency=USD&locale=en' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

レスポンス

アイテムの入ったカートは正常に返却されました。

ボディapplication/json
cart_idstring

カートID。

例: "cart_id"
is_freeboolean

trueの場合、カートは無料です。

itemsArray of objects(Cart_inline_response_200_items)
例: [{"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":[]}]
priceobject or null(Cart_inline_response_200_price)

カートの価格。

例: "{\"amount\":\"6150.0000000000000000\",\"amount_without_discount\":\"6150.0000000000000000\",\"currency\":\"USD\"}"
レスポンス
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ {} ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" } }

カートIDですべてのカートアイテムを削除する

リクエスト

すべてのカートアイテムを削除します。

セキュリティ
AuthForClient
パス
project_idinteger必須

プロジェクトID。

例: 44056
cart_idstring必須

カートID。

例: custom_id
curl -i -X PUT \
  https://xsolla.redocly.app/_mock/ja/api/digital-distribution-hub/v2/project/44056/cart/custom_id/clear \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

レスポンス

カートは正常にクリアされました。

特定のカートにアイテムを入れる

リクエスト

特定のカートにアイテムを入れます。カートに同じSKUのアイテムがすでにある場合は、既存のアイテムの位置が渡された値で置き換えられます。

セキュリティ
AuthForClient
パス
project_idinteger必須

プロジェクトID。

例: 44056
cart_idstring必須

カートID。

例: custom_id
ボディapplication/json
currencystring(Cart-Payment_settings_currency)

標準の決済通貨。ISO 42173文字通貨コード。

itemsArray of objects必須

アイテムのリスト。

items[].​quantitynumber必須
デフォルト 123
items[].​skustring必須
デフォルト "booster_mega_1"
curl -i -X PUT \
  https://xsolla.redocly.app/_mock/ja/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"
    }
  ]'

レスポンス

アイテムの入ったカートは正常に返却されました。

ボディapplication/json
cart_idstring

カートID。

例: "cart_id"
is_freeboolean

trueの場合、カートは無料です。

itemsArray of objects(Cart_inline_response_200_items)
priceobject or null(Cart_inline_response_200_price)

カートの価格。

例: "{\"amount\":\"6150.0000000000000000\",\"amount_without_discount\":\"6150.0000000000000000\",\"currency\":\"USD\"}"
warningsArray of objects(Cart_inline_response_200_1_warnings)
例: [{"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": [ {} ] }
操作

仮想アイテム & 通貨

操作
操作

ユーザートークン

操作
操作
操作