跳转到内容

Overview

  • Version: 2.0.0
  • Servers: https://store.xsolla.com/api
  • Contact Us by Email
  • Contact URL: https://xsolla.com/
  • Required TLS version: 1.2

Catalog API提供端点,用于管理您的游戏内商店目录并处理购买。使用这些端点配置虚拟物品、虚拟货币、游戏密钥、捆绑包、购物车和支付流程、物品属性,以及从外部来源导入物品。

下载 OpenAPI 描述
语言
服务器
Mock server
https://xsolla.redocly.app/_mock/zh/api/catalog/
https://store.xsolla.com/api/
操作
操作
操作

使用以虚拟货币购买的指定商品创建订单Client-side

请求

使用虚拟货币创建商品购买。

安全
XsollaLoginUserJWT
路径
project_idinteger必需

项目ID。您可以在您的发布商帐户项目名称旁边找到。

示例: 44056
item_skustring必需

商品SKU。

示例: booster_mega_1
virtual_currency_skustring必需

虚拟货币SKU。

示例: crystal
查询
platformstring

用户玩游戏的发布平台:xsolla(默认)、playstation_networkxbox_livepc_standalonenintendo_shopgoogle_playapp_store_iosandroid_standaloneios_standaloneandroid_otherios_otherpc_other

默认值 "xsolla"
枚举"playstation_network""xbox_live""xsolla""pc_standalone""nintendo_shop""google_play""app_store_ios""android_standalone""ios_standalone""android_other"
正文application/json
custom_parametersobject or null(Cart-Payment_custom_parameters)[ 1 .. 200 ] properties

自定义参数的形式是一组有效的JSON键值对。
您可以通过此字段传入补充参数来配置反欺诈筛选条件。 请参阅支付中心文档

示例: {"custom_parameters":{"bool_param":true,"int_param":100,"null_param":null,"string_param":"example"}}
curl -i -X POST \
  'https://xsolla.redocly.app/_mock/zh/api/catalog/v2/project/44056/payment/item/booster_mega_1/virtual/crystal?platform=playstation_network' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "custom_parameters": {
      "array_param": [
        {
          "object1": {
            "param": "https://xsolla.com"
          },
          "property": {
            "int_property": 112,
            "string_property": "xsolla"
          }
        },
        {
          "object2": {
            "param": "https://developers.xsolla.com/zh"
          },
          "property": {
            "int_property": 112,
            "string_property": "email@example.com"
          }
        }
      ],
      "bool_param": true,
      "int_param": 100,
      "null_param": null,
      "object_param": {
        "key": "value"
      }
    }
  }'

响应

快速虚拟购买成功。

正文application/json
order_idinteger

订单ID。

响应
application/json
{ "order_id": 641 }
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作

目录

本API允许获取任意类型的可售商品或指定商品。

操作
操作
操作